packages: apache/apache.init - please, man test

gotar gotar at pld-linux.org
Sat Apr 17 17:14:20 CEST 2010


Author: gotar                        Date: Sat Apr 17 15:14:20 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- please, man test

---- Files affected:
packages/apache:
   apache.init (1.66 -> 1.67) 

---- Diffs:

================================================================
Index: packages/apache/apache.init
diff -u packages/apache/apache.init:1.66 packages/apache/apache.init:1.67
--- packages/apache/apache.init:1.66	Sat Jul 25 21:41:29 2009
+++ packages/apache/apache.init	Sat Apr 17 17:14:14 2010
@@ -50,25 +50,24 @@
 checkconfig() {
 	local details=${1:-0}
 
-	if [ $details = 1 ]; then
+	if [ $details -eq 1 ]; then
 		# run config test and display report (status action)
 		show "Checking %s configuration" "$SVC_NAME"; busy
 		local out
 		out=`configtest 2>&1`
 		RETVAL=$?
-		if [ $RETVAL = 0 ]; then
-			ok
-		else
-			fail
-		fi
+		[ $RETVAL -eq 0 ] && ok || fail
 		[ "$out" ] && echo >&2 "$out"
 	else
 		# run config test and abort with nice message if failed
 		# (for actions checking status before action).
+		show "Checking %s configuration" "$SVC_NAME"; busy
 		configtest >/dev/null 2>&1
 		RETVAL=$?
-		if [ $RETVAL != 0 ]; then
-			show "Checking %s configuration" "$SVC_NAME"; fail
+		if [ $RETVAL -eq 0 ]; then
+			ok
+		else
+			fail
 			nls 'Configuration test failed. See details with %s "checkconfig"' $0
 			exit $RETVAL
 		fi
@@ -146,7 +145,7 @@
 	condrestart 0
 	;;
   reload|force-reload|graceful|flush-logs)
-  	reload
+	reload
 	;;
   checkconfig|configtest)
 	checkconfig 1
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/apache/apache.init?r1=1.66&r2=1.67&f=u



More information about the pld-cvs-commit mailing list