From 5e5a3613fe76433d21126f05c1dbff3735fade44 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20=C5=9Awi=C4=85tek?= Date: Fri, 24 Feb 2012 18:36:41 +0100 Subject: [PATCH] - move this into main pretrans --- apache.spec | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/apache.spec b/apache.spec index 87504e5..04eb43f 100644 --- a/apache.spec +++ b/apache.spec @@ -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 . 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!!! -- 2.46.0