aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-07-24 21:43:59 +0000
committerBill Nottingham <notting@redhat.com>1999-07-24 21:43:59 +0000
commitc166ac82d1d846315bba73c787d71716626fe170 (patch)
tree7d7c94c4b9841fc2d08fd8e68e253cf43e2de46e /rc.d
parent471c05a3054ddd37c78f31b907d77ab11cf38807 (diff)
downloadinitscripts-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')
-rwxr-xr-xrc.d/init.d/functions7
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