1 |
commit: c8ea8dca5e71073426ad3766377cf950c9ef815b |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 21 15:40:33 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 3 12:46:26 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=c8ea8dca |
7 |
|
8 |
apache2.initd: append SERVERROOT and CONFIGFILE to APACHE2_OPTS once. |
9 |
|
10 |
We are currently appending both SERVERROOT and CONFIGFILE to |
11 |
APACHE2_OPTS in the checkconfd() function. Since checkconfd() is |
12 |
called multiple times, this can lead to duplication of command-line |
13 |
arguments as witnessed in bug 566726. Since the values of SERVERROOT |
14 |
and CONFIGFILE are fixed, we now instead append them once at the |
15 |
beginning of the script. |
16 |
|
17 |
Gentoo-Bug: 566726 |
18 |
|
19 |
2.4/init/apache2.initd | 8 +++++--- |
20 |
1 file changed, 5 insertions(+), 3 deletions(-) |
21 |
|
22 |
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd |
23 |
index 6320f1a..e81fa59 100755 |
24 |
--- a/2.4/init/apache2.initd |
25 |
+++ b/2.4/init/apache2.initd |
26 |
@@ -22,6 +22,11 @@ SERVERROOT="${SERVERROOT:-/usr/lib/apache2}" |
27 |
CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}" |
28 |
RELOAD_TYPE="${RELOAD_TYPE:-graceful}" |
29 |
|
30 |
+# Append the server root and configuration file parameters to the |
31 |
+# user's APACHE2_OPTS. |
32 |
+APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}" |
33 |
+APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" |
34 |
+ |
35 |
# The path to the apache2 binary. |
36 |
APACHE2="/usr/sbin/apache2" |
37 |
|
38 |
@@ -42,9 +47,6 @@ checkconfd() { |
39 |
eerror "SERVERROOT does not exist: ${SERVERROOT}" |
40 |
return 1 |
41 |
fi |
42 |
- |
43 |
- APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}" |
44 |
- APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" |
45 |
} |
46 |
|
47 |
checkconfig() { |