[apache2] 03/04: Don't use a2query in preinst

Stefan Fritsch sf at moszumanska.debian.org
Sun Sep 28 20:46:08 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 0a1d872ebd4a54556db3cb4cfa53c33d80a875ca
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sun Sep 28 22:35:22 2014 +0200

    Don't use a2query in preinst
    
    It may not be available yet.
---
 debian/apache2.preinst | 4 +++-
 debian/changelog       | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/apache2.preinst b/debian/apache2.preinst
index 6303873..eb27634 100644
--- a/debian/apache2.preinst
+++ b/debian/apache2.preinst
@@ -115,7 +115,9 @@ case "$1" in
 		fi
 
 		if [ -n "$2" ] && dpkg --compare-versions "$2" 'lt' '2.4.7-1~' && dpkg --compare-versions "$2" 'ge' '2.4.1-1' ; then
-			CUR_MPM=$(a2query -M) || exit 1
+			local CUR_MPM="$(ls /etc/apache2/mods-enabled/mpm_*.load)"
+			CUR_MPM="${CUR_MPM##*/mpm_}"
+			CUR_MPM="${CUR_MPM%.load}"
 			if [ "$CUR_MPM" == "itk" ] ; then
 				echo "apache2-mpm-itk" >> /etc/apache2/.apache2_mpm_selected
 			fi
diff --git a/debian/changelog b/debian/changelog
index 133af62..425c146 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ apache2 (2.4.10-3) UNRELEASED; urgency=medium
   * If apache2 is not configured yet, defer actions executed via
     apache2-maintscript-helper. This fixes installation failures if a
     module package is configured first. Closes: #745834
+  * Don't use a2query in preinst, as it may not be available yet.
+    Closes: #745812
   * Include mod_authnz_fcgi. Closes: #762908
   * Add some comments about SSLHonorCipherOrder in ssl.conf. Closes: #746359
   * Remove misleading sentence in apache2-bin's description. Closes: #762645

-- 
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