From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120 Description of problem: the last apache errata lost this: # Source additional OPTIONS if we have them. if [ -f /etc/sysconfig/apache ] ; then . /etc/sysconfig/apache fi Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. rpm -Fvh ftp://ftp.redhat.com/pub/redhat/linux/updates/7.2/en/os/i386/apache-1.3.22-2.i386.rpm 2. 3. Actual Results: lost custom tweeks in /etc/sysconfig/apache Expected Results: /etc/sysconfig/apache being parsed Additional info: this was a very useful config tool I use: [chrismcc]$ cat /etc/sysconfig/apache for I in $(env|cut -d= -f1) ; do unset $I; done ulimit -n 4096 PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH ... to cleanse apache's environment I also tweeked the sysv init thus: --- httpd Fri Dec 7 11:14:54 2001 +++ /etc/init.d/httpd Fri Nov 16 16:23:02 2001 @@ -37,7 +37,7 @@ gsub(/^LIB/,"");\ gsub(/\.SO$/,"");\ print "-DHAVE_" $0}'` - echo ${moduleargs} + echo ${MODULEARGS-$moduleargs} } start() { echo -n $"Starting $prog: " that allow me to customize the httpd args via /etc/sysconfig/apache: # pass args for <IfDefine ...>'s in apache configs # OPTIONS are additions # MODULEARGS will _replace_ the dynamic list done via SysV script # Put options here OPTIONS="" # Put modules here: i.e. MODULEARGS="-DHAVE_MYCUSTOMARG" # MODULEARGS= # we add IAM_HOSTNAME for per server options OPTIONS="-DIAM_$(/bin/hostname --short|env -i tr '[:lower:]' '[:upper:]') ${OPTIONS}" for instance this allows me to install a lot of apache stuff on a development server but only run: httpd -DHAVE_PHP4 -DIM_DEVEL where I don't want -DHAVE_SSL -DHAVE_DAV , etc. This might not be used by a lot of people, but it is extreamly useful to those of us that do
patch: @@ -218,7 +285,7 @@ %pre # Add the "apache" user /usr/sbin/useradd -c "Apache" -u 48 \ - -s /bin/false -r -d /var/www apache 2> /dev/null || : + -s /bin/false -r -d %{contentdir} apache 2> /dev/null || : patch: --- httpd.init.orig Sun Feb 3 09:30:59 2002 +++ httpd.init Sun Feb 3 09:31:09 2002 @@ -13,6 +13,7 @@ # Source function library. . /etc/rc.d/init.d/functions +. /etc/sysconfig/apache # This will prevent initlog from swallowing up a pass-phrase prompt if # mod_ssl needs a pass-phrase from the user. @@ -35,7 +36,7 @@ gsub(/^LIB/,"");\ gsub(/\.SO$/,"");\ print "-DHAVE_" $0}'` - echo ${moduleargs} + echo ${MODULEARGS-$moduleargs} } # The semantics of these two functions differ from the way apachectl does
patch for apachectl: --- apachectl Sun Feb 3 10:16:38 2002 +++ apachectl.orig Sun Feb 3 10:16:38 2002 @@ -42,7 +42,7 @@ gsub(/^LIB/,"");\ gsub(/\.SO$/,"");\ print "-DHAVE_" $0}'` - echo ${MODULEARGS-$moduleargs} + echo ${moduleargs} } # # |||||||||||||||||||| START CONFIGURATION SECTION ||||||||||||||||||||
Oops that was backwards, D'oh --- apachectl.orig Sun Feb 3 10:16:38 2002 +++ apachectl Sun Feb 3 10:16:38 2002 @@ -42,7 +42,7 @@ gsub(/^LIB/,"");\ gsub(/\.SO$/,"");\ print "-DHAVE_" $0}'` - echo ${moduleargs} + echo ${MODULEARGS-$moduleargs} } # # |||||||||||||||||||| START CONFIGURATION SECTION |||||||||||||||||||| apachectl parses /etc/sysconfig/apache but /etc/init.d/httpd does not the sysv init starts and stops via /usr/sbin/httpd not apachectl this can end up with different results depending on how you do the startup
Thanks for the report. This bug is no longer present in the Apache httpd 2.0 packages in Red Hat Enterprise Linux and Fedora Core.