packages: postfix/postfix.init - cosmetic

glen glen at pld-linux.org
Sun May 24 18:16:20 CEST 2009


Author: glen                         Date: Sun May 24 16:16:20 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- cosmetic

---- Files affected:
packages/postfix:
   postfix.init (1.26 -> 1.27) 

---- Diffs:

================================================================
Index: packages/postfix/postfix.init
diff -u packages/postfix/postfix.init:1.26 packages/postfix/postfix.init:1.27
--- packages/postfix/postfix.init:1.26	Fri May  1 00:32:36 2009
+++ packages/postfix/postfix.init	Sun May 24 18:16:15 2009
@@ -31,60 +31,62 @@
 }
 
 start() {
-	local msg
+	if [ -f /var/lock/subsys/postfix ]; then
+		msg_already_running "Postfix"
+		return
+	fi
 
-	if [ ! -f /var/lock/subsys/postfix ]; then
-		msg_starting "Postfix"
-		busy
-		_daemon_set_ulimits
-		msg=$(nice -n ${SERVICE_RUN_NICE_LEVEL:-${DEFAULT_SERVICE_RUN_NICE_LEVEL:-0}} /usr/sbin/postfix start 2>&1)
-		RETVAL=$?
-		if [ $RETVAL -eq 0 ]; then
-			ok
-			touch /var/lock/subsys/postfix
-		else
-			fail
-			echo >&2 "$msg"
-		fi
+	local msg
+	msg_starting "Postfix"
+	busy
+	_daemon_set_ulimits
+	msg=$(nice -n ${SERVICE_RUN_NICE_LEVEL:-${DEFAULT_SERVICE_RUN_NICE_LEVEL:-0}} /usr/sbin/postfix start 2>&1)
+	RETVAL=$?
+	if [ $RETVAL -eq 0 ]; then
+		ok
+		touch /var/lock/subsys/postfix
 	else
-		msg_already_running "Postfix"
+		fail
+		echo >&2 "$msg"
 	fi
 }
 
 stop() {
+	if [ ! -f /var/lock/subsys/postfix ]; then
+		msg_not_running "Postfix"
+		return
+	fi
+
 	local msg
-	if [ -f /var/lock/subsys/postfix ]; then
-		msg_stopping "Postfix"
-		busy
-		msg=$(/usr/sbin/postfix stop 2>&1)
-		if [ $? -eq 0 ]; then
-			ok
-		else
-			fail
-			echo >&2 "$msg"
-		fi
-		rm -f /var/lock/subsys/postfix
+	msg_stopping "Postfix"
+	busy
+	msg=$(/usr/sbin/postfix stop 2>&1)
+	if [ $? -eq 0 ]; then
+		ok
 	else
-		msg_not_running "Postfix"
+		fail
+		echo >&2 "$msg"
 	fi
+	rm -f /var/lock/subsys/postfix
 }
 
 reload() {
+	if [ ! -f /var/lock/subsys/postfix ]; then
+		msg_not_running "Postfix"
+		RETVAL=7
+		return
+	fi
+
 	local msg
-	if [ -f /var/lock/subsys/postfix ]; then
-		msg_reloading "Postfix"
-		busy
-		msg=$(/usr/sbin/postfix reload 2>&1)
-		RETVAL=$?
-		if [ $RETVAL -eq 0 ]; then
-			ok
-		else
-			fail
-			echo >&2 "$msg"
-		   	RETVAL=7
-		fi
+	msg_reloading "Postfix"
+	busy
+	msg=$(/usr/sbin/postfix reload 2>&1)
+	RETVAL=$?
+	if [ $RETVAL -eq 0 ]; then
+		ok
 	else
-		msg_not_running "Postfix"
+		fail
+		echo >&2 "$msg"
 		RETVAL=7
 	fi
 }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/postfix/postfix.init?r1=1.26&r2=1.27&f=u



More information about the pld-cvs-commit mailing list