diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2016-01-21 10:40:33 -0500 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2016-03-03 13:46:26 +0100 |
commit | c8ea8dca5e71073426ad3766377cf950c9ef815b (patch) | |
tree | 476a71f4f80d946cc23726503a80a30eb33d4a57 | |
parent | apache2.initd: append STARTUPERRORLOG to APACHE2_OPTS in start(). (diff) | |
download | apache-c8ea8dca5e71073426ad3766377cf950c9ef815b.tar.gz apache-c8ea8dca5e71073426ad3766377cf950c9ef815b.tar.bz2 apache-c8ea8dca5e71073426ad3766377cf950c9ef815b.zip |
apache2.initd: append SERVERROOT and CONFIGFILE to APACHE2_OPTS once.
We are currently appending both SERVERROOT and CONFIGFILE to
APACHE2_OPTS in the checkconfd() function. Since checkconfd() is
called multiple times, this can lead to duplication of command-line
arguments as witnessed in bug 566726. Since the values of SERVERROOT
and CONFIGFILE are fixed, we now instead append them once at the
beginning of the script.
Gentoo-Bug: 566726
-rwxr-xr-x | 2.4/init/apache2.initd | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd index 6320f1a..e81fa59 100755 --- a/2.4/init/apache2.initd +++ b/2.4/init/apache2.initd @@ -22,6 +22,11 @@ SERVERROOT="${SERVERROOT:-/usr/lib/apache2}" CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}" RELOAD_TYPE="${RELOAD_TYPE:-graceful}" +# Append the server root and configuration file parameters to the +# user's APACHE2_OPTS. +APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}" +APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" + # The path to the apache2 binary. APACHE2="/usr/sbin/apache2" @@ -42,9 +47,6 @@ checkconfd() { eerror "SERVERROOT does not exist: ${SERVERROOT}" return 1 fi - - APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}" - APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" } checkconfig() { |