packages: apache/apache.init - do not checkconfig twice on restart, one tim...

gotar gotar at pld-linux.org
Thu Aug 4 00:42:22 CEST 2011


Author: gotar                        Date: Wed Aug  3 22:42:22 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- do not checkconfig twice on restart, one time before stop is enough (skip
  at start); do we need checkconfig during start at all? It's pointless with
  proper config (normal situation, only makes start slower), and start itself
  would fail on error (no real gain here). I'd go for checkconfig before
  restart only for all services. RFC

---- Files affected:
packages/apache:
   apache.init (1.68 -> 1.69) 

---- Diffs:

================================================================
Index: packages/apache/apache.init
diff -u packages/apache/apache.init:1.68 packages/apache/apache.init:1.69
--- packages/apache/apache.init:1.68	Tue May 11 13:10:16 2010
+++ packages/apache/apache.init	Thu Aug  4 00:42:16 2011
@@ -81,7 +81,7 @@
 		return
 	fi
 
-	checkconfig
+	[ "$1" -eq 0 ] || checkconfig
 	msg_starting "$SVC_NAME"
 	daemon --pidfile /var/run/httpd.pid /usr/sbin/httpd.${HTTPD_MPM} $CFG $HTTPD_OPTS
 	RETVAL=$?
@@ -140,7 +140,7 @@
   restart)
 	checkconfig
 	stop
-	start
+	start 0
 	;;
   try-restart)
 	condrestart 0
================================================================

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



More information about the pld-cvs-commit mailing list