summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/rc.d/rc.subr4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr
index b62cf54f390..24d9eca9212 100644
--- a/etc/rc.d/rc.subr
+++ b/etc/rc.d/rc.subr
@@ -1,4 +1,4 @@
-# $OpenBSD: rc.subr,v 1.28 2011/03/19 19:03:57 ian Exp $
+# $OpenBSD: rc.subr,v 1.29 2011/03/24 07:28:31 robert Exp $
# Default functions and variables used by rc.d(8) scripts.
@@ -51,6 +51,8 @@ rc_cmd() {
[ $(id -u) -eq 0 ] || \
rc_err "$0: need root privileges"
+ [ X"${daemon_flags}" = X"NO" ] && exit 1
+
eval _enotsup=\${rc_${1}}
[ X"${_enotsup}" != X"NO" ] || rc_err "$0: $1 is not supported"