[cpp-sp] 11/12: Also disable shib on initial install

Scott Cantor cantor.2 at osu.edu
Thu Dec 20 19:41:18 EST 2018


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

scantor pushed a commit to annotated tag debian/2.0.dfsg1-4
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=f11f834ac8bc2b9407ad83e50783ae39fecd5ae5

commit f11f834ac8bc2b9407ad83e50783ae39fecd5ae5
Author: Russ Allbery <rra at debian.org>
AuthorDate: Tue Oct 14 21:37:48 2008 -0700

    Also disable shib on initial install
    
    The Shibboleth SP 1.x packages in etch didn't disable their configuration
    properly on removal.  Work around that by disabling shib on initial
    install, just to be sure, in case we're replacing libapache2-mod-shib.
---
 debian/libapache2-mod-shib2.postinst | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/debian/libapache2-mod-shib2.postinst b/debian/libapache2-mod-shib2.postinst
index b217189..12594d1 100755
--- a/debian/libapache2-mod-shib2.postinst
+++ b/debian/libapache2-mod-shib2.postinst
@@ -5,6 +5,11 @@ set -e
 # Prior to 2.0.dfsg1-4, we named our Apache configuration files shib instead
 # of shib2.  We therefore need to unlink the old configuration files, and if
 # they were linked in, we should link in the new ones.
+#
+# We also have to work around a bug in the etch Shibboleth SP 1.x packages
+# that caused them to remove the wrong module configuration and hence not
+# unlink their configuration.  If the 1.x configuration is still linked in, it
+# will break the 2.x module, so make sure it's disabled on initial install.
 if [ "$1" = "configure" ] ; then
     if dpkg --compare-versions "$2" lt-nl 2.0.dfsg1-4 ; then
         if [ -f /etc/apache2/mods-enabled/shib.load ] ; then
@@ -12,6 +17,13 @@ if [ "$1" = "configure" ] ; then
         fi
         a2dismod shib || true
     fi
+
+    # Most of the time, this will produce an error message.  It only does
+    # anything if we're replacing a broken libapache2-mod-shib package.
+    # Suppress the normally useless error message to not confuse people.
+    if [ -z "$2" ] ; then
+        a2dismod shib 2>/dev/null || true
+    fi
 fi
 
 #DEBHELPER#

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list