summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2016-06-19 10:46:09 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2016-06-19 10:46:09 +0000
commit2938941271f93d76d13909c897b976289e553de6 (patch)
tree4ef62ebe085f0416750f121e44106620f2cbd18f /usr.sbin
parent58989698e1813e154bd59c705d0ed1db5f5ce8a7 (diff)
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')
-rw-r--r--usr.sbin/rcctl/rcctl.sh5
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()