[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, next, updated. 1b061a0344c5f3cc459e769e2ad0e62be6f570cb

Stefan Fritsch sf at sfritsch.de
Sat Mar 17 20:45:15 UTC 2012


The following commit has been merged in the next branch:
commit 71292b558a9c1be6eacf3da3355ae0ac99c7e46e
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sat Mar 17 17:54:32 2012 +0100

    guess MPM from .load file if config is broken

diff --git a/debian/a2enmod b/debian/a2enmod
index 74c49cb..bd659c0 100755
--- a/debian/a2enmod
+++ b/debian/a2enmod
@@ -346,9 +346,26 @@ sub remove_link {
 sub threaded {
     my $result = "";
     $result = qx{/usr/sbin/apache2ctl -V | grep 'threaded'} if -x '/usr/sbin/apache2ctl';
+    if ($? != 0) {
+        # config doesn't work
+        if ( -e "$enabldir/mpm_prefork.load" || -e "$enabldir/mpm_itk.load" ) {
+            return 0;
+        }
+        elsif ( -e "$enabldir/mpm_worker.load" || -e "$enabldir/mpm_event.load" ) {
+            return 1;
+        }
+        else {
+            error("Can't determine enabled MPM");
+            # do what user requested
+            return 0;
+        }
+    }
     if ( $result =~ / no/ ) {
         return 0;
     }
+    elsif ( $result =~ / yes/ ) {
+        return 1;
+    }
     else {
         return 1;
     }

-- 
Debian packaging for apache2 (Apache HTTPD 2.x)



More information about the Pkg-apache-commits mailing list