From 23fbf140ba97eb5d88540d77695ef0c31e68b646 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 4 Feb 2022 15:06:42 -0500 Subject: [PATCH 1/7] soup with dockers from iso --- salt/common/tools/sbin/soup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 61b936f1a..65bac5b16 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -1031,6 +1031,10 @@ main() { update_centos_repo yum clean all check_os_updates + # the -f optarg was used + elif [[ ! -z "$ISOLOC" ]]; then + airgap_mounted + airgap_update_dockers else update_registry set +e From 267ef354c28317179cdf2e51e021ab5fe8f2dc45 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 4 Feb 2022 15:09:35 -0500 Subject: [PATCH 2/7] unmount iso after updating dockers --- salt/common/tools/sbin/soup | 1 + 1 file changed, 1 insertion(+) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 65bac5b16..a48f667fb 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -1035,6 +1035,7 @@ main() { elif [[ ! -z "$ISOLOC" ]]; then airgap_mounted airgap_update_dockers + unmount_update else update_registry set +e From eb0696b425e1399535b6a7943b200a54c44012b6 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 4 Feb 2022 15:36:44 -0500 Subject: [PATCH 3/7] update dockers if -f used --- salt/common/tools/sbin/soup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index a48f667fb..4ea1cd82e 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -158,7 +158,7 @@ EOF } airgap_update_dockers() { - if [[ $is_airgap -eq 0 ]]; then + if [[ $is_airgap -eq 0 ]] || [[ ! -z "$ISOLOC" ]]; then # Let's copy the tarball if [[ ! -f $AGDOCKER/registry.tar ]]; then echo "Unable to locate registry. Exiting" From 780aace854ae8dc87eb2015f4c92009191ee6b9f Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 4 Feb 2022 15:44:25 -0500 Subject: [PATCH 4/7] set AGDOCKER --- salt/common/tools/sbin/soup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 4ea1cd82e..994896cf4 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -1031,9 +1031,10 @@ main() { update_centos_repo yum clean all check_os_updates - # the -f optarg was used + # the -f optarg was used and not airgap elif [[ ! -z "$ISOLOC" ]]; then airgap_mounted + AGDOCKER=/tmp/soagupdate/docker airgap_update_dockers unmount_update else From 7c31eb128830f368988221cc3a9d03362d580e8a Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 4 Feb 2022 16:07:06 -0500 Subject: [PATCH 5/7] mount iso at different point --- salt/common/tools/sbin/soup | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 994896cf4..8e0b4782a 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -976,6 +976,11 @@ main() { # Let's mount the ISO since this is airgap airgap_mounted else + # if not airgrap but -f was used + if [[ ! -z "$ISOLOC" ]]; then + airgap_mounted + AGDOCKER=/tmp/soagupdate/docker + fi echo "Cloning Security Onion github repo into $UPDATE_DIR." echo "Removing previous upgrade sources." rm -rf $UPDATE_DIR @@ -1031,10 +1036,8 @@ main() { update_centos_repo yum clean all check_os_updates - # the -f optarg was used and not airgap + # if not airgrap but -f was used elif [[ ! -z "$ISOLOC" ]]; then - airgap_mounted - AGDOCKER=/tmp/soagupdate/docker airgap_update_dockers unmount_update else From 7d09d1f7e26e4f063bc1a4f2208ffacbf0d5c098 Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Mon, 7 Feb 2022 09:22:43 -0500 Subject: [PATCH 6/7] Update soup --- salt/common/tools/sbin/soup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 8e0b4782a..ae3c1b641 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -976,7 +976,7 @@ main() { # Let's mount the ISO since this is airgap airgap_mounted else - # if not airgrap but -f was used + # if not airgap but -f was used if [[ ! -z "$ISOLOC" ]]; then airgap_mounted AGDOCKER=/tmp/soagupdate/docker From e0c0eba24e2f3cd3e43f7a4891428bf9312593d7 Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Mon, 7 Feb 2022 09:23:30 -0500 Subject: [PATCH 7/7] Update soup --- salt/common/tools/sbin/soup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index ae3c1b641..347c10b81 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -1036,7 +1036,7 @@ main() { update_centos_repo yum clean all check_os_updates - # if not airgrap but -f was used + # if not airgap but -f was used elif [[ ! -z "$ISOLOC" ]]; then airgap_update_dockers unmount_update