[Fedora-directory-commits] ldapserver/wrappers initscript.in, 1.12, 1.13

Nathan Kinder nkinder at fedoraproject.org
Fri Feb 20 00:14:36 UTC 2009


Author: nkinder

Update of /cvs/dirsec/ldapserver/wrappers
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5437/wrappers

Modified Files:
	initscript.in 
Log Message:
Resolves: 245894
Summary: Check process name in initscript in a more cross-platform manner.



Index: initscript.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/wrappers/initscript.in,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- initscript.in	17 Feb 2009 23:21:05 -0000	1.12
+++ initscript.in	20 Feb 2009 00:14:34 -0000	1.13
@@ -139,9 +139,8 @@
             if [ -f $pidfile ]; then
                 pid=`cat $pidfile`
                 instlockfile="@localstatedir@/lock/@package_name@/slapd-$instance/server/$pid"
-                if kill -0 $pid && \
-                 [ $(awk '{print $2}' /proc/$pid/stat) = "(ns-slapd)" ] \
-                 > /dev/null 2>&1 ; then
+                name=`ps -p $pid | tail -1 | awk '{ print $4 }'`
+                if kill -0 $pid && [ $name = "ns-slapd" ]; then
                     echo_n " already running"
                     success; echo
                     successes=`expr $successes + 1`




More information about the Fedora-directory-commits mailing list