diff options
author | Bill Nottingham <notting@redhat.com> | 1999-03-16 19:55:15 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-03-16 19:55:15 +0000 |
commit | 974d43214955284d586c5e11cf338cb2a8b3043f (patch) | |
tree | 114c556235e4e81698ccaabcb436e81c99d1c69a | |
parent | b1f6dceb9fa996f29ee021bbf5a958b1a5d5b78c (diff) | |
download | initscripts-974d43214955284d586c5e11cf338cb2a8b3043f.tar initscripts-974d43214955284d586c5e11cf338cb2a8b3043f.tar.gz initscripts-974d43214955284d586c5e11cf338cb2a8b3043f.tar.bz2 initscripts-974d43214955284d586c5e11cf338cb2a8b3043f.tar.xz initscripts-974d43214955284d586c5e11cf338cb2a8b3043f.zip |
fix killproc logic (only one success/failure per call)
-rwxr-xr-x | rc.d/init.d/functions | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 47b5ba8a..e62843c2 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -97,14 +97,16 @@ killproc() { if [ "$notset" = 1 ] ; then if ps h $pid>/dev/null 2>&1; then # TERM first, then KILL if not dead - kill -TERM $pid && success "$base shutdown" || failure "$base shutdown" + kill -TERM $pid + #&& success "$base shutdown" || failure "$base shutdown" usleep 100000 if ps h $pid >/dev/null 2>&1 ; then sleep 1 if ps h $pid >/dev/null 2>&1 ; then sleep 3 if ps h $pid >/dev/null 2>&1 ; then - kill -KILL $pid && success "$base shutdown" || failure "$base shutdown" + kill -KILL $pid + #&& success "$base shutdown" || failure "$base shutdown" fi fi fi @@ -112,12 +114,14 @@ killproc() { # use specified level only else if ps h $pid >/dev/null 2>&1; then - kill $killlevel $pid && success "$base shutdown" || failure "$base shutdown" + kill $killlevel $pid + #&& success "$base shutdown" || failure "$base shutdown" fi fi else failure "$base shutdown" fi + ps h $pid >/dev/null 2>&1 && failure "$base shutdown" || success "$base shutdown" # Remove pid file if any. rm -f /var/run/$base.pid |