diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2016-01-21 09:59:41 -0500 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2016-03-03 13:46:26 +0100 |
commit | 1a07d157d19dbd400d27946f89adb67c149ddf52 (patch) | |
tree | 4c1c89d18eeffa7f5ab3132c119eaa2916ed5e71 | |
parent | apache2.initd: update copyright year to 2016. (diff) | |
download | apache-1a07d157d19dbd400d27946f89adb67c149ddf52.tar.gz apache-1a07d157d19dbd400d27946f89adb67c149ddf52.tar.bz2 apache-1a07d157d19dbd400d27946f89adb67c149ddf52.zip |
apache2.initd: remove config file readability check.
In checkconfd(), the apache2 init script checks to make sure that
$CONFIGFILE is readable. To do this, it needs to reimplement the
relative path handling that apache2 already does. If we remove the
relative path handling from checkconfd(), then apache2 continues to do
the right thing when $CONFIGFILE is relative. However, our custom
readability check fails, since it is looking for an absolute path
that doesn't exist.
Fortunately, apache2 already checks to ensure that the configuration
file exists and is readable. If we remove the custom readability check
entirely, then we get an error like,
* apache2 has detected an error in your setup:
apache2: Could not open configuration file
/usr/lib/apache2/example.conf: No such file or directory
This is not sufficiently worse than the custom error:
Unable to read configuration file: example.conf
Therefore the custom readability check is removed in this commit, and
we can avoid reimplementing the relative path handling as well.
-rwxr-xr-x | 2.4/init/apache2.initd | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd index f49245c..0a1e6a0 100755 --- a/2.4/init/apache2.initd +++ b/2.4/init/apache2.initd @@ -38,11 +38,6 @@ checkconfd() { fi CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}" - [ "${CONFIGFILE#/}" = "${CONFIGFILE}" ] && CONFIGFILE="${SERVERROOT}/${CONFIGFILE}" - if [ ! -r "${CONFIGFILE}" ]; then - eerror "Unable to read configuration file: ${CONFIGFILE}" - return 1 - fi APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}" APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" |