Use so-yaml to update pcapengine pillar and fix file path

Replace fragile sed with so-yaml.py replace for proper YAML handling.
Also correct the pillar file path from soc_soc.sls to soc_global.sls.
This commit is contained in:
Mike Reeves
2026-02-23 11:16:30 -05:00
parent f17e2961ed
commit ca040044bb

View File

@@ -80,7 +80,7 @@ prompt_change_engine() {
fi
echo ""
echo " Updating pcapengine to SURICATA..."
sed -i "s/pcapengine: $current_engine/pcapengine: SURICATA/" /opt/so/saltstack/local/pillar/global/soc_soc.sls
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."
else
pcapengine_not_changed