From 7170289a5e3c12171ada9288fe59d74f0d5724ec Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Mon, 23 Feb 2026 11:35:32 -0500 Subject: [PATCH] Continue upgrade after pcapengine is changed to SURICATA Instead of exiting and requiring the user to rerun the script after changing pcapengine to SURICATA, let the script continue to the version check and upgrade. --- salt/manager/tools/sbin/soupto3 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/salt/manager/tools/sbin/soupto3 b/salt/manager/tools/sbin/soupto3 index 0a9661fb4..62ec83ec3 100755 --- a/salt/manager/tools/sbin/soupto3 +++ b/salt/manager/tools/sbin/soupto3 @@ -75,15 +75,17 @@ prompt_change_engine() { read -rp " Continue with changing pcapengine to SURICATA? (y/N): " CONFIRM_CHANGE if [[ ! "$CONFIRM_CHANGE" =~ ^[Yy]$ ]]; then pcapengine_not_changed - return + return 1 fi fi echo "" echo " Updating pcapengine to SURICATA..." so-yaml.py replace /opt/so/saltstack/local/pillar/global/soc_global.sls global.pcapengine SURICATA - echo " Done. Please run this script again to continue the upgrade." + echo " Done." + return 0 else pcapengine_not_changed + return 1 fi } @@ -107,10 +109,10 @@ case "$PCAP_ENGINE" in echo "" prompt_delete_pcap - prompt_change_engine "$PCAP_ENGINE" - - echo "" - exit 1 + if ! prompt_change_engine "$PCAP_ENGINE"; then + echo "" + exit 1 + fi ;; *) echo ""