1 |
commit: 88b2946f6ef88c1f99ceb63775c0173935d34af5 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 26 15:38:15 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 26 15:39:19 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=88b2946f |
7 |
|
8 |
apache2ctl: don't fail with mutli-line APACHE2_OPTS in conf.d file. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/676990 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
2.4/scripts/apache2ctl | 9 ++++++--- |
14 |
1 file changed, 6 insertions(+), 3 deletions(-) |
15 |
|
16 |
diff --git a/2.4/scripts/apache2ctl b/2.4/scripts/apache2ctl |
17 |
index 6f5920d..9012520 100644 |
18 |
--- a/2.4/scripts/apache2ctl |
19 |
+++ b/2.4/scripts/apache2ctl |
20 |
@@ -8,9 +8,12 @@ RC_VERBS="start stop restart checkconfd configtest modules virtualhosts configdu |
21 |
|
22 |
load_rc_config() { |
23 |
[ -f "${APACHE_RC_CONF}" ] || return 1 |
24 |
- eval "export $(grep '^[[:space:]]*APACHE2_OPTS' ${APACHE_RC_CONF})" |
25 |
- eval $(grep '^[[:space:]]*SERVERROOT' ${APACHE_RC_CONF}) |
26 |
- eval $(grep '^[[:space:]]*CONFIGFILE' ${APACHE_RC_CONF}) |
27 |
+ if ! grep -q '^[[:space:]]*APACHE2_OPTS' ${APACHE_RC_CONF} ; then |
28 |
+ echo "Cannot find APACHE2_OPTS in ${APACHE_RC_CONF}" |
29 |
+ exit 1 |
30 |
+ fi |
31 |
+ . ${APACHE_RC_CONF} |
32 |
+ export APACHE2_OPTS |
33 |
export SERVERROOT="${SERVERROOT:-/usr/@LIBDIR@/apache2}" |
34 |
export CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}" |
35 |
} |