summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@debian.org>2006-10-29 19:38:01 +0000
committerStefan Fritsch <sf@sfritsch.de>2012-01-02 10:36:38 +0100
commitc2221efd1cbdccb01d66464fcbfdfd89168e26bd (patch)
tree03b14be8384fb6b622b6d8220b537593b72baa2c
parent3e0189bf54a83b429ddf8752abca0f82a1cf8db1 (diff)
downloadapache2-c2221efd1cbdccb01d66464fcbfdfd89168e26bd.tar.gz
On reload, make the init script exit 1 with an error message if the
configuration is broken. Closes: #316858 git-svn-id: svn+ssh://svn.debian.org/svn/pkg-apache/trunk/apache2@257 01b336ce-410b-0410-9a02-a0e7f243c266
-rw-r--r--debian/apache2.2-common.init.d7
-rw-r--r--debian/changelog4
2 files changed, 9 insertions, 2 deletions
diff --git a/debian/apache2.2-common.init.d b/debian/apache2.2-common.init.d
index e8973db5..d693cb1e 100644
--- a/debian/apache2.2-common.init.d
+++ b/debian/apache2.2-common.init.d
@@ -113,7 +113,12 @@ case $1 in
fi
;;
reload)
- log_begin_msg "Reloading web server config..."
+ if ! $APACHE2CTL configtest > /dev/null 2>&1; then
+ $APACHE2CTL configtest || true
+ log_end_msg 1
+ exit 1
+ fi
+ log_begin_msg "Reloading web server config..."
if pidof_apache; then
if $APACHE2CTL graceful $2 ; then
log_end_msg 0
diff --git a/debian/changelog b/debian/changelog
index 2cbca40d..86194ed0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,7 +20,9 @@ apache2 (2.2.3-3) UNRELEASED; urgency=medium
Closes: #384128
* Provide sample disk and memory cache configurations. Closes: #278564
* Provide dir.conf. Closes: #392356
- * Add alternate dependency from apache to apache2-mpm-event
+ * Add alternate dependency from apache to apache2-mpm-event
+ * On reload, make the init script exit 1 with an error message if the
+ configuration is broken. Closes: #316858
[ Adam Conrad ]
* Update our php4 and php5 conflicts, to reflect the reality that each