diff --git a/packaging/common/script-templates/script-common-header-last.sh b/packaging/common/script-templates/script-common-header-last.sh index b09e9a355..e2e841b17 100644 --- a/packaging/common/script-templates/script-common-header-last.sh +++ b/packaging/common/script-templates/script-common-header-last.sh @@ -21,29 +21,12 @@ is_nova() test "$PROJECT_TYPE" = "cfengine-nova" || test "$PROJECT_TYPE" = "cfengine-nova-hub" } -INSTLOG=/var/log/CFEngineHub-Install.log -mkdir -p "$(dirname "$INSTLOG")" -CONSOLE=7 -# Redirect most output to log file, but keep console around for custom output. -case "$SCRIPT_TYPE" in - pre*) - eval "exec $CONSOLE>&1 > $INSTLOG 2>&1" - ;; - *) - eval "exec $CONSOLE>&1 >> $INSTLOG 2>&1" - ;; -esac echo "$SCRIPT_TYPE:" # Output directly to console, bypassing log. cf_console() { - # Use subshell to prevent "set +x" from leaking out into the rest of the - # execution. - ( - set +x - "$@" 1>&$CONSOLE 2>&$CONSOLE - ) + "$@" } set -x