From 14c824143bfb821f1b553fa24d68605c15461556 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 4 Apr 2024 08:48:44 -0400 Subject: [PATCH] Attempt to fix 2.3 when main repo changes --- salt/common/soup_scripts.sls | 7 +++++++ salt/manager/tools/sbin/soup | 11 ----------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/salt/common/soup_scripts.sls b/salt/common/soup_scripts.sls index fd32b8a28..99358a1a1 100644 --- a/salt/common/soup_scripts.sls +++ b/salt/common/soup_scripts.sls @@ -1,3 +1,5 @@ +{% if '2.4' in salt['cp.get_file_str']('/etc/soversion') %} + {% import_yaml '/opt/so/saltstack/local/pillar/global/soc_global.sls' as SOC_GLOBAL %} {% if SOC_GLOBAL.global.airgap %} {% set UPDATE_DIR='/tmp/soagupdate/SecurityOnion' %} @@ -68,3 +70,8 @@ copy_so-firewall_sbin: - source: {{UPDATE_DIR}}/salt/manager/tools/sbin/so-firewall - force: True - preserve: True +{% else %} +fix_old_versions: + cmd.run: + - name: BRANCH=2.3/main soup -y +{% endif %} \ No newline at end of file diff --git a/salt/manager/tools/sbin/soup b/salt/manager/tools/sbin/soup index cbe3d461a..a4343faf4 100755 --- a/salt/manager/tools/sbin/soup +++ b/salt/manager/tools/sbin/soup @@ -837,17 +837,6 @@ main() { echo "### Preparing soup at $(date) ###" echo "" - if [[ "$INSTALLEDVERSION" =~ ^2.3 ]]; then - echo "Actually running the code" - BRANCH="2.3/main" - cd $UPDATE_DIR - clone_to_tmp - cp $UPDATE_DIR/securityonion/salt/common/tools/sbin/soup /usr/sbin - cp $UPDATE_DIR/securityonion/salt/common/tools/sbin/soup /opt/so/saltstack/default/salt/common/tools/sbin - add_common - echo "Please run soup again" - exit 0 - fi set_os check_salt_master_status 1 || fail "Could not talk to salt master: Please run 'systemctl status salt-master' to ensure the salt-master service is running and check the log at /opt/so/log/salt/master."