Re-exec soup with 3/main branch when running on 3.X.X

This commit is contained in:
Mike Reeves
2026-04-01 15:27:24 -04:00
parent 472769452c
commit 1355e8eb11

View File

@@ -317,11 +317,7 @@ clone_to_tmp() {
# Make a temp location for the files
mkdir -p /tmp/sogh
cd /tmp/sogh
if [[ "$INSTALLEDVERSION" == 3.* ]]; then
SOUP_BRANCH="-b 3/main"
else
SOUP_BRANCH="-b 2.4/main"
fi
SOUP_BRANCH="-b 2.4/main"
if [ -n "$BRANCH" ]; then
SOUP_BRANCH="-b $BRANCH"
fi
@@ -2132,6 +2128,12 @@ failed_soup_restore_items() {
main() {
trap 'check_err $?' EXIT
# If running 3.X.X, re-launch soup using the 3/main branch
if [[ "$INSTALLEDVERSION" == 3.* && "$BRANCH" != "3/main" ]]; then
echo "Detected Security Onion $INSTALLEDVERSION. Switching to 3/main branch."
exec env BRANCH=3/main soup "$@"
fi
if [ -n "$BRANCH" ]; then
echo "SOUP will use the $BRANCH branch."
echo ""