[Lunar-commits] CVS: moonbase/net/net-tools/init.d network, 1.12, 1.13

Stefan Wold ratler at lunar-linux.org
Mon Jan 17 09:01:06 UTC 2005


Update of /var/cvs/lunar/moonbase/net/net-tools/init.d
In directory espresso.foo-projects.org:/tmp/cvs-serv26907

Modified Files:
	network 
Log Message:
Little bug. If power is lost to a machine configured for dhcp it is possible that another process already took the PID number that was left in the pidfile. This check will also check for processname along with the pid

Index: network
===================================================================
RCS file: /var/cvs/lunar/moonbase/net/net-tools/init.d/network,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- network	6 Oct 2004 20:19:52 -0000	1.12
+++ network	17 Jan 2005 09:01:03 -0000	1.13
@@ -94,7 +94,7 @@
 		    return -1;
 		fi;
 		if [ -e $PIDFILE ]; then
-		    if [ $(ps ax | grep `cat $PIDFILE` | grep -v grep | wc -l) -ge 1 ]; then
+		    if [ $(ps ax | grep `cat $PIDFILE` | grep $DHCP_CLIENT | grep -v grep | wc -l) -ge 1 ]; then
 		        echo -n "already started";
 		        return -3;
 		    else



More information about the Lunar-commits mailing list