commit:     04a0e8d110f76f7e432e32ecf87a81be83e5cf9b
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 23 16:16:16 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Mar 23 16:20:10 2018 +0000
URL:        https://gitweb.gentoo.org/proj/apache.git/commit/?id=04a0e8d1

2.4/scripts/apache2ctl: POSIX shells don't know =~ test operator.

Fixed by using "echo ... | grep -q ..." combination.

Gentoo-Bug: https://bugs.gentoo.org/650678

 2.4/scripts/apache2ctl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/2.4/scripts/apache2ctl b/2.4/scripts/apache2ctl
index 2c7c699..6f5920d 100644
--- a/2.4/scripts/apache2ctl
+++ b/2.4/scripts/apache2ctl
@@ -17,7 +17,7 @@ load_rc_config() {
 
 # If first parameter is a verb defined in $RC_VERBS, pass the command to init 
script.
 # In other cases, compile command line and run the command on apache binary.
-if [ "${RC_VERBS}" =~ "${1}" ] ; then
+if echo "${RC_VERBS}" | grep -q "${1}" ; then
        exec /etc/init.d/apache2 "${@}"
 else
        load_rc_config || exit 1

Reply via email to