diff options
Diffstat (limited to 'etc/rc.d/rc.subr')
-rw-r--r-- | etc/rc.d/rc.subr | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 0a60073635c..3875d86ca14 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.6 2010/10/28 15:36:37 robert Exp $ +# $OpenBSD: rc.subr,v 1.7 2010/10/28 21:03:33 robert Exp $ [ -z "${local_rcconf}" ] && . /etc/rc.conf @@ -26,8 +26,16 @@ rc_stop() { } rc_cmd() { - [ `id -u` -eq 0 -o X"$1" = "Xcheck" ] || rc_err "$0: need root privileges" + _name=`basename $0` + eval _rcflags=\${${_name}_flags} + + echo $_rcflags + exit + + [ `id -u` -eq 0 -o X"$1" = "Xcheck" ] || \ + rc_err "$0: need root privileges" [ -n "${daemon}" ] || rc_err "$0: daemon is not set" + [ -n "${_rcflags}" ] && daemon_flags=${_rcflags} [ -n "${pexp}" ] || pexp="${daemon}${daemon_flags:+ ${daemon_flags}}" case "$1" in |