fix other OS installs

This commit is contained in:
Mike Reeves
2023-07-17 10:55:04 -04:00
parent 71cbab8fcc
commit bffd24e0d5
2 changed files with 10 additions and 12 deletions

View File

@@ -199,17 +199,13 @@ get_random_value() {
} }
gpg_rpm_import() { gpg_rpm_import() {
if [[ $is_supported ]]; then if [[ $is_oracle ]]; then
if [[ "$WHATWOULDYOUSAYYAHDOHERE" == "setup" ]]; then if [[ "$WHATWOULDYOUSAYYAHDOHERE" == "setup" ]]; then
local RPMKEYSLOC="../salt/repo/client/files/$OS/keys" local RPMKEYSLOC="../salt/repo/client/files/$OS/keys"
else else
local RPMKEYSLOC="$UPDATE_DIR/salt/repo/client/files/$OS/keys" local RPMKEYSLOC="$UPDATE_DIR/salt/repo/client/files/$OS/keys"
fi fi
if [[ $is_rocky ]]; then
RPMKEYS=('RPM-GPG-KEY-rockyofficial' 'RPM-GPG-KEY-EPEL-9' 'SALT-PROJECT-GPG-PUBKEY-2023.pub' 'docker.pub' 'securityonion.pub')
else
RPMKEYS=('RPM-GPG-KEY-EPEL-9' 'SALT-PROJECT-GPG-PUBKEY-2023.pub' 'docker.pub' 'securityonion.pub' 'MariaDB-Server-GPG-KEY') RPMKEYS=('RPM-GPG-KEY-EPEL-9' 'SALT-PROJECT-GPG-PUBKEY-2023.pub' 'docker.pub' 'securityonion.pub' 'MariaDB-Server-GPG-KEY')
fi
for RPMKEY in "${RPMKEYS[@]}"; do for RPMKEY in "${RPMKEYS[@]}"; do
rpm --import $RPMKEYSLOC/$RPMKEY rpm --import $RPMKEYSLOC/$RPMKEY
echo "Imported $RPMKEY" echo "Imported $RPMKEY"

View File

@@ -1924,7 +1924,7 @@ remove_package() {
securityonion_repo() { securityonion_repo() {
# Remove all the current repos # Remove all the current repos
if [[ $is_supported ]]; then if [[ $is_oracle ]]; then
logCmd "dnf -v clean all" logCmd "dnf -v clean all"
logCmd "mkdir -vp /root/oldrepos" logCmd "mkdir -vp /root/oldrepos"
logCmd "mv -v /etc/yum.repos.d/* /root/oldrepos/" logCmd "mv -v /etc/yum.repos.d/* /root/oldrepos/"
@@ -1942,11 +1942,13 @@ securityonion_repo() {
echo "enabled=1" >> /etc/yum.repos.d/securityonion.repo echo "enabled=1" >> /etc/yum.repos.d/securityonion.repo
echo "gpgcheck=1" >> /etc/yum.repos.d/securityonion.repo echo "gpgcheck=1" >> /etc/yum.repos.d/securityonion.repo
fi fi
fi
logCmd "dnf repolist all" logCmd "dnf repolist all"
if [[ $waitforstate ]]; then if [[ $waitforstate ]]; then
if [[ ! $is_airgap ]]; then if [[ ! $is_airgap ]]; then
if [[ $is_rpm ]]; then
# Build the repo locally so we can use it # Build the repo locally so we can use it
echo "Syncing Repo" echo "Syncing Repos"
repo_sync_local repo_sync_local
fi fi
fi fi