The included apache2 init script doesn't have an easy method to do a test of the configuration without a stop / start. If you're making changes and want to test those changes without taking the server down, a configtest is what would normally be used on a standard Apache installation. You could also use /usr/sbin/apache2 -t $APACHE_OPTS_FROM_CONF.D but that's a bit cumbersome. I've included a patch to add the option, which just calls checkconfig and reports success if the check succeeds, or lets the checkconfig display any errors. Reproducible: Always Steps to Reproduce: 1. Run /etc/init.d/apache2 configtest Actual Results: Normal init script invalid arguments display. Expected Results: Either a report of the error or a note that there were no errors encountered. --- apache2.initd 2005-01-22 17:33:49.462073551 -0700 +++ apache2 2005-01-22 17:10:45.000000000 -0700 @@ -3,7 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-www/apache/files/2.0.49/apache2.initd,v 1.8 2004/07/15 00:24:42 agriffis Exp $ -opts="${opts} reload" +opts="${opts} reload configtest" [ "x${SERVERROOT}" != "x" ] && APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}" [ "x${CONFIGFILE}" != "x" ] && APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" @@ -14,6 +14,12 @@ [ -z "${PIDFILE}" ] && PIDFILE=/var/run/apache2.pid [ -z "${RESTARTSTYLE}" ] && RESTARTSTYLE="graceful" +configtest() +{ + checkconfig || return 1 + einfo "Apache configuration OK" +} + checkconfig() { local myconf="/etc/apache2/conf/apache2.conf" if [ "x${CONFIGFILE}" != "x" ]; then
Jamie: please do not inline, always attach as plain text
this is fixed in cvs, please try currently hard masked ebuilds (1.3.33-r1 and 2.0.52-r3) it may take some hrs until the new tarballs are on the mirrors.. see also http://dev.gentoo.org/~vericgar/package-refresh.txt