diff options
author | ajacoutot <ajacoutot@openbsd.org> | 2016-06-19 10:46:08 +0000 |
---|---|---|
committer | ajacoutot <ajacoutot@openbsd.org> | 2016-06-19 10:46:08 +0000 |
commit | ac129c26ca6df448bbf8ddb0526fe520a9142891 (patch) | |
tree | b994f459f0e2a98ed45d4904812dc0f045ae9348 /usr.sbin/rcctl | |
parent | add pool_setipl on all pools. (diff) | |
download | wireguard-openbsd-ac129c26ca6df448bbf8ddb0526fe520a9142891.tar.xz wireguard-openbsd-ac129c26ca6df448bbf8ddb0526fe520a9142891.zip |
grep(1) /etc/rc.conf instead of /etc/rc to detect whether a particular
rc.d script comes from base of not; it's much faster.
ok robert@
Diffstat (limited to 'usr.sbin/rcctl')
-rw-r--r-- | usr.sbin/rcctl/rcctl.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/rcctl/rcctl.sh b/usr.sbin/rcctl/rcctl.sh index a3c26d612ca..2b92f4e847e 100644 --- a/usr.sbin/rcctl/rcctl.sh +++ b/usr.sbin/rcctl/rcctl.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: rcctl.sh,v 1.96 2016/06/17 11:24:58 ajacoutot Exp $ +# $OpenBSD: rcctl.sh,v 1.97 2016/06/19 10:46:08 ajacoutot Exp $ # # Copyright (c) 2014, 2015 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -150,8 +150,7 @@ svc_is_base() local _svc=$1 [ -n "${_svc}" ] || return - grep -E 'start_daemon[[:space:]]+[[:alnum:]]' /etc/rc | \ - cut -d ' ' -f2- | grep -qw -- ${_svc} + grep -qw "^${_svc}_flags" /etc/rc.conf } svc_is_meta() |