diff options
author | Bill Nottingham <notting@redhat.com> | 1999-08-17 16:28:49 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-08-17 16:28:49 +0000 |
commit | 06065d550c2a468a4d73dae3172eff554fbac09e (patch) | |
tree | 34d0e08cfa31e1971e97ed3e744172d07a2af1bb | |
parent | c28cf9172a191c6425749f2f1a36e69a6e2b2e2b (diff) | |
download | initscripts-06065d550c2a468a4d73dae3172eff554fbac09e.tar initscripts-06065d550c2a468a4d73dae3172eff554fbac09e.tar.gz initscripts-06065d550c2a468a4d73dae3172eff554fbac09e.tar.bz2 initscripts-06065d550c2a468a4d73dae3172eff554fbac09e.tar.xz initscripts-06065d550c2a468a4d73dae3172eff554fbac09e.zip |
*** empty log message ***
-rw-r--r-- | initscripts.spec | 2 | ||||
-rwxr-xr-x | rc.d/init.d/functions | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/initscripts.spec b/initscripts.spec index 5f847acb..48cc9821 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -4,7 +4,7 @@ Name: initscripts Version: %{version} Copyright: GPL Group: System Environment/Base -Release: 2 +Release: 3 Source: initscripts-%{version}.tar.gz BuildRoot: /var/tmp/initbld Requires: mingetty, bash, /bin/awk, /bin/sed, mktemp, e2fsprogs, console-tools 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. |