Browse Source

if daemon_flags=NO is set, just exit

ok ajacoutot@
OPENBSD_5_0
robert 13 years ago
parent
commit
ea651f538f
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/etc/rc.d/rc.subr

+ 3
- 1
src/etc/rc.d/rc.subr View File

@ -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. # Default functions and variables used by rc.d(8) scripts.
@ -51,6 +51,8 @@ rc_cmd() {
[ $(id -u) -eq 0 ] || \ [ $(id -u) -eq 0 ] || \
rc_err "$0: need root privileges" rc_err "$0: need root privileges"
[ X"${daemon_flags}" = X"NO" ] && exit 1
eval _enotsup=\${rc_${1}} eval _enotsup=\${rc_${1}}
[ X"${_enotsup}" != X"NO" ] || rc_err "$0: $1 is not supported" [ X"${_enotsup}" != X"NO" ] || rc_err "$0: $1 is not supported"


Loading…
Cancel
Save