diff options
author | Bill Nottingham <notting@redhat.com> | 1999-07-24 21:43:59 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-07-24 21:43:59 +0000 |
commit | c166ac82d1d846315bba73c787d71716626fe170 (patch) | |
tree | 7d7c94c4b9841fc2d08fd8e68e253cf43e2de46e /rc.d/init.d/functions | |
parent | 471c05a3054ddd37c78f31b907d77ab11cf38807 (diff) | |
download | initscripts-c166ac82d1d846315bba73c787d71716626fe170.tar initscripts-c166ac82d1d846315bba73c787d71716626fe170.tar.gz initscripts-c166ac82d1d846315bba73c787d71716626fe170.tar.bz2 initscripts-c166ac82d1d846315bba73c787d71716626fe170.tar.xz initscripts-c166ac82d1d846315bba73c787d71716626fe170.zip |
When we write to initlog's FD, write in subshell so we don't die with SIGPIPE
Diffstat (limited to 'rc.d/init.d/functions')
-rwxr-xr-x | rc.d/init.d/functions | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 050135e2..68875fdc 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -252,7 +252,8 @@ success() { if [ -z "$IN_INITLOG" ]; then initlog $INITLOG_ARGS -n $0 -s "$1" -e 1 else - echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21 + # silly hack to avoid EPIPE killing rc.sysinit + sh -c "echo \"$INITLOG_ARGS -n $0 -s \\\"$1\\\" -e 1\"" >&21 fi [ "$BOOTUP" != "verbose" ] && echo_success return 0 @@ -264,7 +265,7 @@ failure() { if [ -z "$IN_INITLOG" ]; then initlog $INITLOG_ARGS -n $0 -s "$1" -e 2 else - echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 2" >&21 + sh -c "echo \"$INITLOG_ARGS -n $0 -s \\\"$1\\\" -e 2\"" >&21 fi [ "$BOOTUP" != "verbose" ] && echo_failure return $rc @@ -276,7 +277,7 @@ passed() { if [ -z "$IN_INITLOG" ]; then initlog $INITLOG_ARGS -n $0 -s "$1" -e 1 else - echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21 + sh -c "echo \"$INITLOG_ARGS -n $0 -s \\\"$1\\\" -e 1\"" >&21 fi [ "$BOOTUP" != "verbose" ] && echo_passed return $rc |