From c12a6d9a3710225259f2d7853e2be19a4802ddd5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 28 Oct 1998 21:52:26 +0000 Subject: fix status() (was catching instance of initscripts) --- rc.d/init.d/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rc.d/init.d') diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index e33554ab..eea288a9 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -127,7 +127,7 @@ status() { echo "$1 (pid $pid) is running..." return 0 else - pid=`ps auxww | grep '[^[]'$1 | awk '{print $2}'` + pid=`ps auxww | awk '{ if ($12 ~ /^[^[]'"$1"'/) print $2}'` if [ "$pid" != "" ] ; then echo "$1 (pid $pid) is running..." return 0 -- cgit