]> TLD Linux GIT Repositories - packages/apache.git/commitdiff
- move this into main pretrans
authorBartosz Świątek <shadzik@tld-linux.org>
Fri, 24 Feb 2012 17:36:41 +0000 (18:36 +0100)
committerBartosz Świątek <shadzik@tld-linux.org>
Fri, 24 Feb 2012 17:36:41 +0000 (18:36 +0100)
apache.spec

index 87504e5b5dd2d5cd6d10f4640a5abcdf223de5b8..04eb43f98a22a133804d3e9fb912df9b73c5b7e5 100644 (file)
@@ -2377,6 +2377,15 @@ if [ ! -L /etc/httpd/httpd.conf ]; then
        install -d /etc/httpd
        ln -s conf.d /etc/httpd/httpd.conf
 fi
+if [ -f /etc/sysconfig/httpd ]; then
+       MPM=$(grep HTTPD_MPM /etc/sysconfig/httpd |sed 's,HTTPD_MPM=,,;s,",,g')
+       if [ -n $MPM ]; then
+               echo "LoadModule mpm_${MPM}_module                modules/mod_mpm_${MPM}.so" > /etc/httpd/conf.d/10_mpm.conf.rpmnew
+               cat /etc/httpd/conf.d/10_mpm.conf >> /etc/httpd/conf.d/10_mpm.conf.rpmnew
+               mv /etc/httpd/conf.d/10_mpm.conf.rpmnew /etc/httpd/conf.d/10_mpm.conf
+       fi
+fi
+
 exit 0
 
 %post base
@@ -2482,14 +2491,6 @@ Please report bugs to <http://bugs.pld-linux.org/>.
 
 EOF
 
-%pretrans base -- %{name} < 2.4.0
-if [ -f /etc/sysconfig/httpd ]; then
-       MPM=$(grep HTTPD_MPM /etc/sysconfig/httpd |sed 's,HTTPD_MPM=,,;s,",,g')
-       echo "LoadModule mpm_${MPM}_module                modules/mod_mpm_${MPM}.so" > /etc/httpd/conf.d/10_mpm.conf.rpmnew
-       cat /etc/httpd/conf.d/10_mpm.conf >> /etc/httpd/conf.d/10_mpm.conf.rpmnew
-       mv /etc/httpd/conf.d/10_mpm.conf.rpmnew /etc/httpd/conf.d/10_mpm.conf
-fi
-
 %triggerpostun base -- %{name} < 2.4.0
 %banner %{name}-2.4.1 << EOF
 WARNING!!!