From 974d43214955284d586c5e11cf338cb2a8b3043f Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 16 Mar 1999 19:55:15 +0000 Subject: fix killproc logic (only one success/failure per call) --- rc.d/init.d/functions | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'rc.d') 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 -- cgit v1.2.1