aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/functions10
1 files changed, 5 insertions, 5 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 819230fd..0f6dbfe6 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -73,9 +73,9 @@ checkpid() {
local i
for i in $* ; do
- [ -d "/proc/$i" ] || return 1
+ [ -d "/proc/$i" ] && return 0
done
- return 0
+ return 1
}
@@ -193,12 +193,12 @@ killproc() {
if [ "$notset" -eq "1" ] ; then
if checkpid $pid 2>&1; then
# TERM first, then KILL if not dead
- kill -TERM $pid
+ kill -TERM $pid >/dev/null 2>&1
usleep 100000
if checkpid $pid && sleep 1 &&
checkpid $pid && sleep 3 &&
checkpid $pid ; then
- kill -KILL $pid
+ kill -KILL $pid >/dev/null 2>&1
usleep 100000
fi
fi
@@ -209,7 +209,7 @@ killproc() {
# use specified level only
else
if checkpid $pid; then
- kill $killlevel $pid
+ kill $killlevel $pid >/dev/null 2>&1
RC=$?
[ "$RC" -eq 0 ] && success $"$base $killlevel" || failure $"$base $killlevel"
fi