SOURCES: pound.init - create lockfile if any instance was started

glen glen at pld-linux.org
Tue Sep 11 14:27:45 CEST 2007


Author: glen                         Date: Tue Sep 11 12:27:45 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- create lockfile if any instance was started

---- Files affected:
SOURCES:
   pound.init (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: SOURCES/pound.init
diff -u SOURCES/pound.init:1.10 SOURCES/pound.init:1.11
--- SOURCES/pound.init:1.10	Tue Sep 11 14:14:23 2007
+++ SOURCES/pound.init	Tue Sep 11 14:27:40 2007
@@ -39,7 +39,7 @@
 }
 
 start() {
-	local ret
+	local ret started=0
 	# Check if the service is already running?
 	if [ ! -f /var/lock/subsys/pound -o "$single" = 1 ]; then
 		for instance in $POUND_INSTANCES; do
@@ -47,9 +47,12 @@
 			msg_starting "Pound ($instance)"
 			daemon pound -f /etc/pound/$instance.cfg -p /var/run/pound/$instance.pid
 			ret=$?
-			[ $RETVAL -eq 0 ] && RETVAL=$ret
+			if [ $RETVAL -eq 0 ]; then
+			   	RETVAL=$ret
+				started=1
+			fi
 		done
-		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/pound
+		[ $started = 1 ] && touch /var/lock/subsys/pound
 
 		if [ -z "$ret" -a "$single" = 1 ]; then
 			msg_already_running "Pound ($instance)"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pound.init?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list