commit:     ab533766866142e385035dd3420b99b7ce23efc4
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  3 16:04:30 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 16:04:30 2020 +0000
URL:        https://gitweb.gentoo.org/proj/apache.git/commit/?id=ab533766

2.4/init: Another small interface check tweak

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 2.4/init/apache2.initd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 6e5e292..77e9e36 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -37,7 +37,7 @@ depend() {
        after sshd
        if ! echo ${rc_need} | grep -Fq "net." ; then
                local x warn_addr
-               for x in $(virtualhosts | grep '^\(\[\|\*:\|\)[[:digit:]]' | 
sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
+               for x in $(virtualhosts 2>/dev/null | grep 
'^\(\[\|\*:\|\)[[:digit:]]' | sed 
's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
                        case "${x}" in
                                \*:80|\*:443) ;;
                                *) warn_addr="${warn_addr} ${x}" ;;

Reply via email to