aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initscripts-3.12.spec7
-rwxr-xr-xrc.d/init.d/functions12
2 files changed, 16 insertions, 3 deletions
diff --git a/initscripts-3.12.spec b/initscripts-3.12.spec
index 6d39a1c9..dccabbb0 100644
--- a/initscripts-3.12.spec
+++ b/initscripts-3.12.spec
@@ -15,6 +15,13 @@ that activate and deactivate most network interfaces.
%changelog
+
+* Tue Sep 16 1997 Donnie Barnes <djb@redhat.com>
+
+- reworked status() to adjust for processes that change their argv[0] in
+ the process table. The process must still have it's "name" in the argv[0]
+ string (ala sendmail: blah blah).
+
* Mon Sep 15 1997 Erik Troan <ewt@redhat.com>
- fixed bug in FORWARD_IPV4 support
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index e3b1494e..b9342390 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -62,10 +62,10 @@ killproc() {
if [ "$notset" = 1 ] ; then
# TERM first, then KILL if not dead
kill -TERM $pid
- usleep 10000
+ usleep 100000
dead=`ps aux | awk "{print $2}" | grep $pid`
if [ "$dead" != "" ]; then
- sleep 4
+ sleep 3
kill -KILL $pid
fi
# use specified level only
@@ -117,8 +117,14 @@ status() {
# First try "pidof"
pid=`pidof $1`
if [ "$pid" != "" ] ; then
- echo "$1 is running..."
+ echo "$1 (pid $pid) is running..."
return 0
+ else
+ pid=`ps auxww | grep $1 | egrep -v grep\|$0 | awk '{print $2}'`
+ if [ "$pid" != "" ] ; then
+ echo "$1 (pid $pid) is running..."
+ return 0
+ fi
fi
# Next try "/var/run/*.pid" files