Skip to content

Commit

Permalink
Merge pull request #10937 from Security-Onion-Solutions/dougburks-pat…
Browse files Browse the repository at this point in the history
…ch-1

Update soup for airgap
  • Loading branch information
dougburks authored Aug 3, 2023
2 parents 13c3e7f + 80598d7 commit 1907ea8
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions salt/manager/tools/sbin/soup
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ check_airgap() {
is_airgap=0
UPDATE_DIR=/tmp/soagupdate/SecurityOnion
AGDOCKER=/tmp/soagupdate/docker
AGREPO=/tmp/soagupdate/Packages
AGREPO=/tmp/soagupdate/minimal/Packages
else
is_airgap=1
fi
Expand Down Expand Up @@ -402,9 +402,7 @@ postupgrade_changes() {

[[ "$POSTVERSION" == 2.4.2 ]] && post_to_2.4.3
[[ "$POSTVERSION" == 2.4.3 ]] && post_to_2.4.4
[[ "$POSTVERSION" == 2.4.4 ]] && post_to_2.4.5


[[ "$POSTVERSION" == 2.4.4 ]] && post_to_2.4.5
true
}

Expand Down Expand Up @@ -479,11 +477,22 @@ up_to_2.4.4() {
}

up_to_2.4.5() {
update_elastic_agent
determine_elastic_agent_upgrade

INSTALLEDVERSION=2.4.5
}

determine_elastic_agent_upgrade() {
if [[ $is_airgap -eq 0 ]]; then
update_elastic_agent_airgap
else
update_elastic_agent
}

update_elastic_agent_airgap() {
rsync -av /tmp/soagupdate/fleet/* /nsm/elastic-fleet/artifacts/
}

verify_upgradespace() {
CURRENTSPACE=$(df -BG / | grep -v Avail | awk '{print $4}' | sed 's/.$//')
if [ "$CURRENTSPACE" -lt "10" ]; then
Expand Down Expand Up @@ -521,6 +530,7 @@ update_centos_repo() {
echo "Syncing new updates to /nsm/repo"
rsync -av $AGREPO/* /nsm/repo/
echo "Creating repo"
dnf -y install yum-utils createrepo
createrepo /nsm/repo
}

Expand Down

0 comments on commit 1907ea8

Please sign in to comment.