[shibboleth-sp2] 01/02: Avoid failure to install shibboleth-sp2-utils without apache2

Russ Allbery eagle at eyrie.org
Fri Nov 28 02:38:51 UTC 2014


This is an automated email from the git hooks/post-receive script.

rra pushed a commit to branch wheezy-backports
in repository shibboleth-sp2.

commit ffbd6f9457eb185174f2f1c440aab43fe7d88a11
Author: Luca Bruno <lucab at debian.org>
Date:   Thu Nov 27 18:17:27 2014 -0800

    Avoid failure to install shibboleth-sp2-utils without apache2
    
    Installing shibboleth-sp2-utils without apache2 fails because the
    postinst script assumes that a2enmod exists.
---
 debian/changelog                     | 7 +++++++
 debian/shibboleth-sp2-utils.postinst | 7 +++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 20be3aa..14e618a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+shibboleth-sp2 (2.5.3+dfsg-1~bpo70+2) wheezy-backports; urgency=medium
+
+  * shibboleth-sp2-utils: check before enabling Apache module
+    (Closes: #758600)
+
+ -- Luca Bruno <lucab at debian.org>  Fri, 14 Nov 2014 12:42:46 +0100
+
 shibboleth-sp2 (2.5.3+dfsg-1~bpo70+1) wheezy-backports; urgency=medium
 
   * Backport to wheezy.
diff --git a/debian/shibboleth-sp2-utils.postinst b/debian/shibboleth-sp2-utils.postinst
index 637f158..e4eeaa4 100755
--- a/debian/shibboleth-sp2-utils.postinst
+++ b/debian/shibboleth-sp2-utils.postinst
@@ -20,8 +20,11 @@ if [ "$1" = "configure" ] ; then
     fi
 
     # Enable the module by default on new installs.
-    if [ -z "$2" ] && [ ! -e /etc/apache2/mods-enabled/shib2.load ] ; then
-        a2enmod shib2
+    A2ENMOD="`which a2enmod || echo ''`"
+    if [ -z "$2" ] && [ -n "$A2ENMOD" ] && [ -x "$A2ENMOD" ] \
+        && [ -e /etc/apache2/mods-available/shib2.load ] \
+        && [ ! -e /etc/apache2/mods-enabled/shib2.load ] ; then
+        $A2ENMOD shib2
     fi
 fi
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git



More information about the Pkg-shibboleth-devel mailing list