Fix gpg things

This commit is contained in:
Mike Reeves
2023-06-27 13:57:53 -04:00
parent bdb5748b44
commit 04fe2ca996
9 changed files with 92 additions and 88 deletions

View File

@@ -199,11 +199,11 @@ get_random_value() {
}
gpg_rpm_import() {
if [[ "$OS" == "rocky" ]]; then
if [[ $is_rocky || $is_centos ]]; then
if [[ "$WHATWOULDYOUSAYYAHDOHERE" == "setup" ]]; then
local RPMKEYSLOC="../salt/repo/client/files/rocky/keys"
local RPMKEYSLOC="../salt/repo/client/files/$OS/keys"
else
local RPMKEYSLOC="$UPDATE_DIR/salt/repo/client/files/rocky/keys"
local RPMKEYSLOC="$UPDATE_DIR/salt/repo/client/files/$OS/keys"
fi
RPMKEYS=('RPM-GPG-KEY-rockyofficial' 'RPM-GPG-KEY-EPEL-9' 'SALT-PROJECT-GPG-PUBKEY-2023.pub' 'docker.pub' 'securityonion.pub')
@@ -384,19 +384,22 @@ salt_minion_count() {
}
set_cron_service_name() {
if [[ "$OS" == "rocky" ]]; then
cron_service_name="crond"
else
cron_service_name="cron"
fi
}
set_os() {
if [ -f /etc/redhat-release ]; then
OS=rocky
if grep -q "Rocky Linux release 9" /etc/redhat-release; then
OS=rocky
OSVER=9
is_rocky=true
elif grep -q "CentOS Stream release 9" /etc/redhat-release; then
OS=centos
OSVER=9
is_centos=true
fi
cron_service_name="crond"
else
OS=ubuntu
is_ubuntu=true
cron_service_name="cron"
fi
}
@@ -405,7 +408,7 @@ set_minionid() {
}
set_palette() {
if [ "$OS" == ubuntu ]; then
if [[ $is_ubuntu ]]; then
update-alternatives --set newt-palette /etc/newt/palette.original
fi
}