From 53e93f01c6de24f0fedd6595d3173fa359d4bb0b Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 16 Mar 2023 09:49:57 -0400 Subject: [PATCH 1/7] Force an update after repo is configured --- setup/so-functions | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/so-functions b/setup/so-functions index b3b1319a5..d0afbe9f8 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1959,6 +1959,7 @@ securityonion_repo() { echo "Syncing Repo" repo_sync_local fi + logCmd "dnf -y update" fi } From 6e3194486c275f0beb6dba0386e2c209ec82a62a Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 16 Mar 2023 13:50:22 -0400 Subject: [PATCH 2/7] Force package update before syncing the repo --- setup/so-functions | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/so-functions b/setup/so-functions index d0afbe9f8..b377a8d15 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1985,6 +1985,7 @@ repo_sync_local() { echo "gpgkey=https://repo.securityonion.net/file/securityonion-repo/keys/securityonion.pub" >> /root/repodownload.conf dnf repolist + logCmd "dnf -c /root/repodownload.conf -y upgrade" # Make sure we can get to the sig repo logCmd "curl --retry 5 --retry-delay 60 -A 'gridinstall/$SOVERSION/$OS/$(uname -r)/1' https://sigs.securityonion.net/checkup --output /tmp/checkup" logCmd "dnf reposync --norepopath -g --delete -m -c /root/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" From 849e82e39f5170ac1c8cf5a93d707ef083af7c01 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 16 Mar 2023 15:36:43 -0400 Subject: [PATCH 3/7] Force package updates and curl check fix --- setup/so-functions | 9 +++++---- setup/so-whiptail | 4 +++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index b377a8d15..3e2f55b3f 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -139,11 +139,11 @@ check_admin_pass() { check_manager_connection() { # See if you can curl the manager. If not you can either try again or continue info "Checking manager connectivity" - man_test_err=$(curl -k -L -sS https://$MSRVIP/repo --connect-timeout 5 2>&1) + man_test_err=$(curl -s $MSRVIP:4505 --connect-timeout 5 2>&1) local ret=$? - if [[ $ret != 0 ]]; then + if [[ $ret != 1 ]]; then error "Could not reach $MSRV" whiptail_manager_unreachable fi @@ -1984,8 +1984,9 @@ repo_sync_local() { echo "gpgcheck=1" >> /root/repodownload.conf echo "gpgkey=https://repo.securityonion.net/file/securityonion-repo/keys/securityonion.pub" >> /root/repodownload.conf - dnf repolist - logCmd "dnf -c /root/repodownload.conf -y upgrade" + logCmd "dnf repolist" + echo "This is trying to work" + logCmd "dnf -c /root/repodownload.conf -y upgrade --allowerasing" # Make sure we can get to the sig repo logCmd "curl --retry 5 --retry-delay 60 -A 'gridinstall/$SOVERSION/$OS/$(uname -r)/1' https://sigs.securityonion.net/checkup --output /tmp/checkup" logCmd "dnf reposync --norepopath -g --delete -m -c /root/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" diff --git a/setup/so-whiptail b/setup/so-whiptail index 6123ea97d..bf1463c67 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -1143,11 +1143,13 @@ whiptail_reinstall() { read -r -d '' message <<- EOM Setup has detected a previous install. Continuing the install will remove the previous install configuration. + Selecting continue is a destructive action. + Would you like to continue? EOM whiptail --title "$whiptail_title" \ - --yesno "$message" 11 75 \ + --yesno "$message" 13 75 \ --yes-button "Continue" --no-button "Exit" --defaultno local exitstatus=$? From 957467eae0446e86ad7f4aaf9f02c03169789ec0 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 16 Mar 2023 15:41:29 -0400 Subject: [PATCH 4/7] Force package update before syncing the repo --- setup/so-functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup/so-functions b/setup/so-functions index 3e2f55b3f..70562fcf8 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1985,8 +1985,9 @@ repo_sync_local() { echo "gpgkey=https://repo.securityonion.net/file/securityonion-repo/keys/securityonion.pub" >> /root/repodownload.conf logCmd "dnf repolist" - echo "This is trying to work" + info "This is trying to work" logCmd "dnf -c /root/repodownload.conf -y upgrade --allowerasing" + info "There should be an update here # Make sure we can get to the sig repo logCmd "curl --retry 5 --retry-delay 60 -A 'gridinstall/$SOVERSION/$OS/$(uname -r)/1' https://sigs.securityonion.net/checkup --output /tmp/checkup" logCmd "dnf reposync --norepopath -g --delete -m -c /root/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" From 2b65c1498d856b1427871b777f77c9493807c93c Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 16 Mar 2023 15:45:04 -0400 Subject: [PATCH 5/7] Force package update before syncing the repo --- setup/so-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/so-functions b/setup/so-functions index 70562fcf8..5a9af8000 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1987,7 +1987,7 @@ repo_sync_local() { logCmd "dnf repolist" info "This is trying to work" logCmd "dnf -c /root/repodownload.conf -y upgrade --allowerasing" - info "There should be an update here + info "There should be an update here" # Make sure we can get to the sig repo logCmd "curl --retry 5 --retry-delay 60 -A 'gridinstall/$SOVERSION/$OS/$(uname -r)/1' https://sigs.securityonion.net/checkup --output /tmp/checkup" logCmd "dnf reposync --norepopath -g --delete -m -c /root/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" From ef4882198a90c29e714136a7ca43ddc82c71aa34 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 16 Mar 2023 15:48:57 -0400 Subject: [PATCH 6/7] Force package update before syncing the repo --- setup/so-functions | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index 5a9af8000..3a6d2bbfd 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1985,9 +1985,6 @@ repo_sync_local() { echo "gpgkey=https://repo.securityonion.net/file/securityonion-repo/keys/securityonion.pub" >> /root/repodownload.conf logCmd "dnf repolist" - info "This is trying to work" - logCmd "dnf -c /root/repodownload.conf -y upgrade --allowerasing" - info "There should be an update here" # Make sure we can get to the sig repo logCmd "curl --retry 5 --retry-delay 60 -A 'gridinstall/$SOVERSION/$OS/$(uname -r)/1' https://sigs.securityonion.net/checkup --output /tmp/checkup" logCmd "dnf reposync --norepopath -g --delete -m -c /root/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" @@ -2385,7 +2382,7 @@ update_sudoers() { update_packages() { if [[ $is_rocky ]]; then logCmd "dnf repolist" - logCmd "dnf -y update --exclude=salt*,wazuh*,docker*,containerd*" + logCmd "dnf -y update --allowerasing --exclude=salt*,wazuh*,docker*,containerd*" else retry 150 10 "apt-get -y update" >> "$setup_log" 2>&1 || exit 1 retry 150 10 "apt-get -y upgrade" >> "$setup_log" 2>&1 || exit 1 From d12367ed751bdef85e735dd18331d58053351518 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 16 Mar 2023 15:54:00 -0400 Subject: [PATCH 7/7] Force package update before syncing the repo --- setup/so-functions | 1 - 1 file changed, 1 deletion(-) diff --git a/setup/so-functions b/setup/so-functions index 3a6d2bbfd..2378e31c5 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1959,7 +1959,6 @@ securityonion_repo() { echo "Syncing Repo" repo_sync_local fi - logCmd "dnf -y update" fi }