From 4539024280d1601a210f71f90155d28f28d68155 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Tue, 10 Mar 2026 15:05:52 -0400 Subject: [PATCH] Add minimum version check and fix function call syntax in soup Require at least Security Onion 2.4.210 before allowing upgrade. Fix determine_elastic_agent_upgrade() call syntax (remove parens). --- salt/manager/tools/sbin/soup | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/salt/manager/tools/sbin/soup b/salt/manager/tools/sbin/soup index 2f487c4af..6d209a750 100755 --- a/salt/manager/tools/sbin/soup +++ b/salt/manager/tools/sbin/soup @@ -374,10 +374,17 @@ postupgrade_changes() { true } +check_minimum_version() { + if [[ "$INSTALLEDVERSION" != "2.4.210" ]] && [[ ! "$INSTALLEDVERSION" =~ ^3\. ]]; then + echo "You must be on at least Security Onion 2.4.210 to upgrade. Currently installed version: $INSTALLEDVERSION" + exit 1 + fi +} + ### 3.0.0 Scripts ### up_to_3.0.0() { - determine_elastic_agent_upgrade() + determine_elastic_agent_upgrade INSTALLEDVERSION=3.0.0 } @@ -1086,6 +1093,8 @@ main() { MINION_ROLE=$(lookup_role) echo "Found that Security Onion $INSTALLEDVERSION is currently installed." echo "" + check_minimum_version + if [[ $is_airgap -eq 0 ]]; then # Let's mount the ISO since this is airgap airgap_mounted