aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-07-27 16:13:57 +0000
committerBill Nottingham <notting@redhat.com>1999-07-27 16:13:57 +0000
commitf9eb0227dbe1eae50cb91fa7395d66883829c106 (patch)
tree20d7e529b793574564833ed1e0902376e6b7ff84
parent5dbdf14914f1c800cebac32e64ed9f065d82ebbd (diff)
downloadinitscripts-f9eb0227dbe1eae50cb91fa7395d66883829c106.tar
initscripts-f9eb0227dbe1eae50cb91fa7395d66883829c106.tar.gz
initscripts-f9eb0227dbe1eae50cb91fa7395d66883829c106.tar.bz2
initscripts-f9eb0227dbe1eae50cb91fa7395d66883829c106.tar.xz
initscripts-f9eb0227dbe1eae50cb91fa7395d66883829c106.zip
trap sigpipe in shell...
-rwxr-xr-xrc.d/init.d/functions12
1 files changed, 9 insertions, 3 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 68875fdc..5f4e71b6 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -253,7 +253,9 @@ success() {
initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
else
# silly hack to avoid EPIPE killing rc.sysinit
- sh -c "echo \"$INITLOG_ARGS -n $0 -s \\\"$1\\\" -e 1\"" >&21
+ trap SIGPIPE
+ echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21
+ trap -
fi
[ "$BOOTUP" != "verbose" ] && echo_success
return 0
@@ -265,7 +267,9 @@ failure() {
if [ -z "$IN_INITLOG" ]; then
initlog $INITLOG_ARGS -n $0 -s "$1" -e 2
else
- sh -c "echo \"$INITLOG_ARGS -n $0 -s \\\"$1\\\" -e 2\"" >&21
+ trap SIGPIPE
+ echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 2" >&21
+ trap -
fi
[ "$BOOTUP" != "verbose" ] && echo_failure
return $rc
@@ -277,7 +281,9 @@ passed() {
if [ -z "$IN_INITLOG" ]; then
initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
else
- sh -c "echo \"$INITLOG_ARGS -n $0 -s \\\"$1\\\" -e 1\"" >&21
+ trap SIGPIPE
+ echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21
+ trap -
fi
[ "$BOOTUP" != "verbose" ] && echo_passed
return $rc