Run PatchMon generated installer with bash
This commit is contained in:
+7
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user