aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-08-17 16:28:49 +0000
committerBill Nottingham <notting@redhat.com>1999-08-17 16:28:49 +0000
commit06065d550c2a468a4d73dae3172eff554fbac09e (patch)
tree34d0e08cfa31e1971e97ed3e744172d07a2af1bb /rc.d
parentc28cf9172a191c6425749f2f1a36e69a6e2b2e2b (diff)
downloadinitscripts-06065d550c2a468a4d73dae3172eff554fbac09e.tar
initscripts-06065d550c2a468a4d73dae3172eff554fbac09e.tar.gz
initscripts-06065d550c2a468a4d73dae3172eff554fbac09e.tar.bz2
initscripts-06065d550c2a468a4d73dae3172eff554fbac09e.tar.xz
initscripts-06065d550c2a468a4d73dae3172eff554fbac09e.zip
*** empty log message ***
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/functions10
1 files changed, 8 insertions, 2 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index fcd61237..eca7f56f 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -90,6 +90,7 @@ daemon() {
# A function to stop a program.
killproc() {
+ RC=0
# Test syntax.
if [ $# = 0 ]; then
echo "Usage: killproc {program} [signal]"
@@ -129,11 +130,15 @@ killproc() {
fi
fi
fi
- ps h $pid >/dev/null 2>&1 && failure "$base shutdown" || success "$base shutdown"
+ ps h $pid >/dev/null 2>&1
+ RC=$?
+ [ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown"
# use specified level only
else
if ps h $pid >/dev/null 2>&1; then
- kill $killlevel $pid && success "$base $killlevel" || failure "$base $killlevel"
+ kill $killlevel $pid
+ RC=$?
+ [ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel"
fi
fi
else
@@ -144,6 +149,7 @@ killproc() {
if [ "$notset" = "1" ]; then
rm -f /var/run/$base.pid
fi
+ return $RC
}
# A function to find the pid of a program.