[apache2] 01/01: apache2-maintscript-helper: print config errors
Stefan Fritsch
sf at moszumanska.debian.org
Sun Aug 31 22:36:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to branch master
in repository apache2.
commit 6c58221353dd212149b3680f765c7b4532f9fb3e
Author: Stefan Fritsch <sf at sfritsch.de>
Date: Mon Sep 1 00:34:41 2014 +0200
apache2-maintscript-helper: print config errors
Don't hide apache's error message if the config is broken
---
debian/changelog | 2 ++
debian/debhelper/apache2-maintscript-helper | 10 +++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 3469d4b..cac35da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ apache2 (2.4.10-2) UNRELEASED; urgency=medium
logs. The daily rotation also has the advantage of regenerating things
like TLS session ticket keys more often. Closes: #759382
* Clarify description of apache2 package. Closes: #755976
+ * In the maintainer script helper, print out Apache's error message if
+ the config check fails.
-- Stefan Fritsch <sf at debian.org> Wed, 27 Aug 2014 07:22:55 +0200
diff --git a/debian/debhelper/apache2-maintscript-helper b/debian/debhelper/apache2-maintscript-helper
index d7e77e3..1c2ea7b 100644
--- a/debian/debhelper/apache2-maintscript-helper
+++ b/debian/debhelper/apache2-maintscript-helper
@@ -462,11 +462,19 @@ apache2_reload()
;;
esac
- if apache2ctl configtest 2>/dev/null; then
+ local tmpfile=$(mktemp)
+ if apache2ctl configtest > $tmpfile 2>&1; then
invoke-rc.d apache2 $action || true
else
apache2_msg "err" "apache2_reload: Your configuration is broken. Not ${action}ing Apache 2"
+ grep -v -e "Action 'configtest' failed." \
+ -e "The Apache error log may have more information." \
+ $tmpfile |
+ while read LINE ; do
+ apache2_msg "err" "apache2_reload: $LINE"
+ done
fi
+ rm -f $tmpfile
}
# vim: syntax=sh sw=8 sts=8 sr noet
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git
More information about the Pkg-apache-commits
mailing list