We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79e2b98 commit 4471936Copy full SHA for 4471936
packaging/common/script-templates/script-common-header-last.sh
@@ -21,29 +21,12 @@ is_nova()
21
test "$PROJECT_TYPE" = "cfengine-nova" || test "$PROJECT_TYPE" = "cfengine-nova-hub"
22
}
23
24
-INSTLOG=/var/log/CFEngineHub-Install.log
25
-mkdir -p "$(dirname "$INSTLOG")"
26
-CONSOLE=7
27
-# Redirect most output to log file, but keep console around for custom output.
28
-case "$SCRIPT_TYPE" in
29
- pre*)
30
- eval "exec $CONSOLE>&1 > $INSTLOG 2>&1"
31
- ;;
32
- *)
33
- eval "exec $CONSOLE>&1 >> $INSTLOG 2>&1"
34
35
-esac
36
echo "$SCRIPT_TYPE:"
37
38
# Output directly to console, bypassing log.
39
cf_console()
40
{
41
- # Use subshell to prevent "set +x" from leaking out into the rest of the
42
- # execution.
43
- (
44
- set +x
45
- "$@" 1>&$CONSOLE 2>&$CONSOLE
46
- )
+ "$@"
47
48
49
set -x
0 commit comments