Skip to content

Commit

Permalink
Merge pull request #12752 from Security-Onion-Solutions/updates23
Browse files Browse the repository at this point in the history
Allow 2.3 to update
  • Loading branch information
TOoSmOotH authored Apr 4, 2024
2 parents 7b4e207 + 784ec54 commit 8788b34
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
23 changes: 17 additions & 6 deletions salt/common/soup_scripts.sls
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{% 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' %}
{% else %}
{% set UPDATE_DIR='/tmp/sogh/securityonion' %}
{% endif %}
{% 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' %}
{% else %}
{% set UPDATE_DIR='/tmp/sogh/securityonion' %}
{% endif %}

remove_common_soup:
file.absent:
Expand Down Expand Up @@ -75,3 +77,12 @@ copy_so-yaml_sbin:
- source: {{UPDATE_DIR}}/salt/manager/tools/sbin/so-yaml.py
- force: True
- preserve: True

{% else %}
fix_23_soup_sbin:
cmd.run:
- name: curl -s -f -o /usr/sbin/soup https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.3/main/salt/common/tools/sbin/soup
fix_23_soup_salt:
cmd.run:
- name: curl -s -f -o /opt/so/saltstack/defalt/salt/common/tools/sbin/soup https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.3/main/salt/common/tools/sbin/soup
{% endif %}
1 change: 0 additions & 1 deletion salt/manager/tools/sbin/soup
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,6 @@ main() {

echo "### Preparing soup at $(date) ###"
echo ""

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."
Expand Down

0 comments on commit 8788b34

Please sign in to comment.