summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2016-01-21 09:59:41 -0500
committerLars Wendler <polynomial-c@gentoo.org>2016-03-03 13:46:26 +0100
commit1a07d157d19dbd400d27946f89adb67c149ddf52 (patch)
tree4c1c89d18eeffa7f5ab3132c119eaa2916ed5e71
parentapache2.initd: update copyright year to 2016. (diff)
downloadapache-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-x2.4/init/apache2.initd5
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}"