misc/116329: apache20 rc-script doesn't always source
%%PREFIX%%/sbin/envvars when needed
Ruud Althuizen
ruud at il.fontys.nl
Thu Sep 13 04:00:14 PDT 2007
>Number: 116329
>Category: misc
>Synopsis: apache20 rc-script doesn't always source %%PREFIX%%/sbin/envvars when needed
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Sep 13 11:00:14 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Ruud Althuizen
>Release: 6.2-PRERELEASE
>Organization:
>Environment:
FreeBSD charm.il.fontys.nl 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Mon Oct 2 20:21:05 CEST 2006 root at charm.il.fontys.nl:/usr/obj/usr/src/sys/IL_QUOTA i386
>Description:
When you add *.env files to /usr/local/etc/apache2/envvars.d/ they only get sourced after start_cmd(). But apache2_checkconfig() also needs those includes. So I moved the lines.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -Naur old/apache20/files/apache2.sh.in new/apache20/files/apache2.sh.in
--- old/apache20/files/apache2.sh.in Thu Sep 13 12:46:40 2007
+++ new/apache20/files/apache2.sh.in Thu Sep 13 12:58:12 2007
@@ -98,11 +98,17 @@
apache2_checkconfig()
{
+ if test -f %%PREFIX%%/sbin/envvars
+ then
+ . %%PREFIX%%/sbin/envvars
+ fi
+
echo "Performing sanity check on apache2 configuration:"
eval ${command} ${apache2_flags} -t
}
-apache2_graceful() {
+apache2_graceful()
+{
apache2_requirepidfile
echo "Performing a graceful restart"
@@ -113,18 +119,12 @@
{
apache2_checkconfig
- if test -f %%PREFIX%%/sbin/envvars
- then
- . %%PREFIX%%/sbin/envvars
- fi
-
if checkyesno apache2limits_enable
then
eval `/usr/bin/limits ${apache2limits_args}` 2>/dev/null
else
return 0
fi
-
}
extra_commands="reload graceful configtest"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list