Run PatchMon generated installer with bash

This commit is contained in:
2026-09-29 19:43:01 +00:00
parent f08fb7841b
commit 4a90f75cb2
+7 -2
View File
@@ -268,10 +268,15 @@ if [[ "$PRINT_ONLY" == "true" ]]; then
fi
log "Running PatchMon enrollment script as type: $ENROLL_TYPE"
# PatchMon's generated scripts use bash-specific features. The proxmox-lxc
# installer in particular contains `trap ... ERR`, which fails under Debian's
# /bin/sh (dash) with `trap: ERR: bad trap`. Always execute the generated
# installer with bash.
need_cmd bash
if [[ -n "$FRIENDLY_NAME_VALUE" ]]; then
FRIENDLY_NAME="$FRIENDLY_NAME_VALUE" sh "$tmp_script"
FRIENDLY_NAME="$FRIENDLY_NAME_VALUE" bash "$tmp_script"
else
sh "$tmp_script"
bash "$tmp_script"
fi
normalize_agent_config