diff options
author | 2019-02-26 16:38:15 +0100 | |
---|---|---|
committer | 2019-02-26 16:39:19 +0100 | |
commit | 88b2946f6ef88c1f99ceb63775c0173935d34af5 (patch) | |
tree | 2917794821e776dd5079c20cad00bfab6000faa0 | |
parent | Don't perform SSL exceptions for MSIE anymore. (diff) | |
download | apache-88b2946f6ef88c1f99ceb63775c0173935d34af5.tar.gz apache-88b2946f6ef88c1f99ceb63775c0173935d34af5.tar.bz2 apache-88b2946f6ef88c1f99ceb63775c0173935d34af5.zip |
apache2ctl: don't fail with mutli-line APACHE2_OPTS in conf.d file.
Bug: https://bugs.gentoo.org/676990
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-rw-r--r-- | 2.4/scripts/apache2ctl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/2.4/scripts/apache2ctl b/2.4/scripts/apache2ctl index 6f5920d..9012520 100644 --- a/2.4/scripts/apache2ctl +++ b/2.4/scripts/apache2ctl @@ -8,9 +8,12 @@ RC_VERBS="start stop restart checkconfd configtest modules virtualhosts configdu load_rc_config() { [ -f "${APACHE_RC_CONF}" ] || return 1 - eval "export $(grep '^[[:space:]]*APACHE2_OPTS' ${APACHE_RC_CONF})" - eval $(grep '^[[:space:]]*SERVERROOT' ${APACHE_RC_CONF}) - eval $(grep '^[[:space:]]*CONFIGFILE' ${APACHE_RC_CONF}) + if ! grep -q '^[[:space:]]*APACHE2_OPTS' ${APACHE_RC_CONF} ; then + echo "Cannot find APACHE2_OPTS in ${APACHE_RC_CONF}" + exit 1 + fi + . ${APACHE_RC_CONF} + export APACHE2_OPTS export SERVERROOT="${SERVERROOT:-/usr/@LIBDIR@/apache2}" export CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}" } |