Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Sep 2007 10:59:47 GMT
From:      Ruud Althuizen <ruud@il.fontys.nl>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/116329: apache20 rc-script doesn't always source %%PREFIX%%/sbin/envvars when needed
Message-ID:  <200709131059.l8DAxl7c066801@www.freebsd.org>
Resent-Message-ID: <200709131100.l8DB0Eon082107@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709131059.l8DAxl7c066801>