commit:     02437d8a3c0a83d2e20af8f05f071233ad1d3339
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 26 15:40:26 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Feb 26 15:41:28 2019 +0000
URL:        https://gitweb.gentoo.org/proj/apache.git/commit/?id=02437d8a

apache2ctl: Don't show grep usage message with leading "-" options.

Thanks-to: Freenode IRC-user "omelius"
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 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 9012520..8031b8b 100644
--- a/2.4/scripts/apache2ctl
+++ b/2.4/scripts/apache2ctl
@@ -20,7 +20,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 echo "${RC_VERBS}" | grep -q "${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