SOURCES: apache1.init, apache.init - unify apache initscripts

glen glen at pld-linux.org
Wed Oct 15 14:48:57 CEST 2008


Author: glen                         Date: Wed Oct 15 12:48:57 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- unify apache initscripts

---- Files affected:
SOURCES:
   apache1.init (1.28 -> 1.29) , apache.init (1.61 -> 1.62) 

---- Diffs:

================================================================
Index: SOURCES/apache1.init
diff -u SOURCES/apache1.init:1.28 SOURCES/apache1.init:1.29
--- SOURCES/apache1.init:1.28	Mon Oct 13 17:07:03 2008
+++ SOURCES/apache1.init	Wed Oct 15 14:48:51 2008
@@ -87,13 +87,13 @@
 		start
 	else
 		fail
-		echo >&2 "Configuration file syntax test failed."
+		echo >&2 "Configuration file syntax test failed. Run $0 configtest to see errors."
 	fi
 }
 
 reload() {
-	sig=${1:-HUP}
-	retnr=${2:-7}
+	local sig=${1:-HUP}
+	local retnr=${2:-7}
 	if [ -f /var/lock/subsys/apache ]; then
 		msg_reloading apache
 
@@ -103,7 +103,7 @@
 			RETVAL=$?
 		else
 			fail
-			echo >&2 "Configuration file syntax test failed."
+			echo >&2 "Configuration file syntax test failed. Run $0 configtest to see errors."
 		fi
 	else
 		msg_not_running apache
@@ -120,11 +120,6 @@
   stop)
   	stop
 	;;
-  status)
-	status apache
-	RETVAL=$?
-	/usr/sbin/apache -S
-	;;
   restart)
 	restart
 	;;
@@ -146,6 +141,11 @@
 	;;
   configtest)
 	/usr/sbin/apache -t
+	;;
+  status)
+	status apache
+	RETVAL=$?
+	/usr/sbin/apache -S
 	;;
   *)
 	msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|graceful|configtest|status}"

================================================================
Index: SOURCES/apache.init
diff -u SOURCES/apache.init:1.61 SOURCES/apache.init:1.62
--- SOURCES/apache.init:1.61	Tue Oct 14 18:00:17 2008
+++ SOURCES/apache.init	Wed Oct 15 14:48:51 2008
@@ -41,6 +41,7 @@
 
 configtest() {
 	/usr/sbin/httpd.${HTTPD_MPM} -t $CFG $HTTPD_OPTS >/dev/null 2>&1
+	RETVAL=$?
 }
 
 start() {
@@ -100,7 +101,6 @@
   reload|force-reload|graceful)
 	if [ -f /var/lock/subsys/httpd ]; then
 		configtest
-		RETVAL=$?
 		if [ $RETVAL -eq 0 ]; then
 			msg_reloading httpd.${HTTPD_MPM}
 			busy
@@ -118,14 +118,13 @@
 		msg_reloading httpd.${HTTPD_MPM}
 
 		configtest
-		RETVAL=$?
 		if [ $RETVAL -eq 0 ]; then
 			/usr/sbin/httpd.${HTTPD_MPM} $CFG -k graceful
 			RETVAL=$?
 			[ $RETVAL -eq 0 ] && ok || fail
 		else
 			fail
-			echo >&2 "Configuration file syntax test failed."
+			echo >&2 "Configuration file syntax test failed. Run $0 configtest to see errors."
 		fi
 	fi
 	;;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/apache1.init?r1=1.28&r2=1.29&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/apache.init?r1=1.61&r2=1.62&f=u



More information about the pld-cvs-commit mailing list