From f6b9dec2ae9994e4deabf8d2e2445bb78182b360 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 2 Aug 2023 09:45:29 -0400 Subject: [PATCH 1/8] Add supersoup mode --- salt/common/tools/sbin/soup | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 20d5e56e3..a5b047bf9 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -17,9 +17,24 @@ . /usr/sbin/so-common +INSTALLEDVERSION=$(cat /etc/soversion) + +if [[ $INSTALLEDSALTVERSION == "2.4.4" ]]; then + + echo "Initiating supersoup mode" + mkdir -p /tmp/supersoup + cd /tmp/supersoup + echo "No Capes!" + wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/dev/salt/manager/tools/sbin/soup + cp soup /opt/so/saltstack/ + salt-call state.apply manager --queue=true + echo "Please run soup a second time." + + exit 0 +fi + UPDATE_DIR=/tmp/sogh/securityonion DEFAULT_SALT_DIR=/opt/so/saltstack/default -INSTALLEDVERSION=$(cat /etc/soversion) POSTVERSION=$INSTALLEDVERSION INSTALLEDSALTVERSION=$(salt --versions-report | grep Salt: | awk '{print $2}') BATCHSIZE=5 From 6a7e756a3771be66247da60b9b947dac230af306 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 2 Aug 2023 09:47:35 -0400 Subject: [PATCH 2/8] Add supersoup mode --- 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 a5b047bf9..a9615b1e7 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -19,7 +19,7 @@ INSTALLEDVERSION=$(cat /etc/soversion) -if [[ $INSTALLEDSALTVERSION == "2.4.4" ]]; then +if [[ $INSTALLEDVERSION == "2.4.4" ]]; then echo "Initiating supersoup mode" mkdir -p /tmp/supersoup From 93c5e6a9e8e8cba7ec5a09d15ae9cb1b9ad68962 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 2 Aug 2023 09:49:14 -0400 Subject: [PATCH 3/8] Add supersoup mode --- 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 a9615b1e7..818beb71e 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -27,7 +27,8 @@ if [[ $INSTALLEDVERSION == "2.4.4" ]]; then echo "No Capes!" wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/dev/salt/manager/tools/sbin/soup cp soup /opt/so/saltstack/ - salt-call state.apply manager --queue=true + echo "Replacing soup" + salt-call state.apply manager echo "Please run soup a second time." exit 0 From 9bb28fd0b57b5e6850713a57052fc37aed30fa27 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 2 Aug 2023 10:31:55 -0400 Subject: [PATCH 4/8] Add supersoup mode --- 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 818beb71e..073f3abf0 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -25,7 +25,7 @@ if [[ $INSTALLEDVERSION == "2.4.4" ]]; then mkdir -p /tmp/supersoup cd /tmp/supersoup echo "No Capes!" - wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/dev/salt/manager/tools/sbin/soup + wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/main/salt/manager/tools/sbin/soup cp soup /opt/so/saltstack/ echo "Replacing soup" salt-call state.apply manager From fcc369d4b9a0dd3de941a778dc2dfb655292fc05 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 2 Aug 2023 10:46:54 -0400 Subject: [PATCH 5/8] Add supersoup mode --- salt/common/tools/sbin/soup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 073f3abf0..a63f74905 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -25,9 +25,9 @@ if [[ $INSTALLEDVERSION == "2.4.4" ]]; then mkdir -p /tmp/supersoup cd /tmp/supersoup echo "No Capes!" + echo "Updating soup..." wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/main/salt/manager/tools/sbin/soup - cp soup /opt/so/saltstack/ - echo "Replacing soup" + echo "Updating soup..." salt-call state.apply manager echo "Please run soup a second time." From d2ae8f81e1ca8f805080b77cd187bba0a9957952 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 2 Aug 2023 10:49:51 -0400 Subject: [PATCH 6/8] Add supersoup mode --- 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 a63f74905..f85c3b61d 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -24,9 +24,9 @@ if [[ $INSTALLEDVERSION == "2.4.4" ]]; then echo "Initiating supersoup mode" mkdir -p /tmp/supersoup cd /tmp/supersoup - echo "No Capes!" echo "Updating soup..." wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/main/salt/manager/tools/sbin/soup + cp soup /opt/so/saltstack/default/salt/manager/tools/sbin echo "Updating soup..." salt-call state.apply manager echo "Please run soup a second time." From 3f5f93059ef1b9c9571b3df60bf61340e3a8b61b Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 2 Aug 2023 11:20:23 -0400 Subject: [PATCH 7/8] Add supersoup mode --- salt/common/tools/sbin/soup | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index f85c3b61d..0dddc5a21 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -34,6 +34,11 @@ if [[ $INSTALLEDVERSION == "2.4.4" ]]; then exit 0 fi +if [ "$INSTALLEDVERSION" = '2.4.3' ] || [ "$INSTALLEDVERSION" = '2.4.2' ] || [ "$INSTALLEDVERSION" = '2.4.1' ] || [ "$INSTALLEDVERSION" = '2.4.0' ]; then + echo "soup is not supported on $INSTALLEDVERSION. Please install the latest 2.4 release. + exit 1 +fi + UPDATE_DIR=/tmp/sogh/securityonion DEFAULT_SALT_DIR=/opt/so/saltstack/default POSTVERSION=$INSTALLEDVERSION From 679775a7d0d8259a0e4b5a26388da712b781eba4 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 2 Aug 2023 11:21:28 -0400 Subject: [PATCH 8/8] Add supersoup mode --- 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 0dddc5a21..3a5a807c2 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -35,7 +35,7 @@ if [[ $INSTALLEDVERSION == "2.4.4" ]]; then fi if [ "$INSTALLEDVERSION" = '2.4.3' ] || [ "$INSTALLEDVERSION" = '2.4.2' ] || [ "$INSTALLEDVERSION" = '2.4.1' ] || [ "$INSTALLEDVERSION" = '2.4.0' ]; then - echo "soup is not supported on $INSTALLEDVERSION. Please install the latest 2.4 release. + echo "soup is not supported on $INSTALLEDVERSION. Please install the latest 2.4 release." exit 1 fi