From 7e5a6b9280e19aae032ba31d3092798d8e805811 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 10 Mar 1999 15:22:20 +0000 Subject: change to pidofproc suggested by "Mike McHenry" --- rc.d/init.d/functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rc.d/init.d/functions') diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index daba8c5b..45de373a 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -148,9 +148,9 @@ pidofproc() { fi # Finally try to extract it from ps - ps auxw | awk 'BEGIN { prog=ARGV[1]; ARGC=1 } - { if ((prog == $11) || (("(" prog ")") == $11) || - ((prog ":") == $11)) { print $2 ; exit 0 } }' $1 + ps ax | awk 'BEGIN { prog=ARGV[1]; ARGC=1 } + { if ((prog == $5) || (("(" prog ")") == $5) || + ((prog ":") == $5)) { print $1 ; exit 0 } }' $1 } status() { -- cgit v1.2.1