diff options
author | Robert Nagy <robert@cvs.openbsd.org> | 2010-10-28 21:03:34 +0000 |
---|---|---|
committer | Robert Nagy <robert@cvs.openbsd.org> | 2010-10-28 21:03:34 +0000 |
commit | 5e30fca37df71f1d578eade942af05b34dbdb781 (patch) | |
tree | 849b64e6e5f7aa9c54955de2ed2777eff44716ce | |
parent | 80c3573f8addffbb6af96284a47cfe1143e8fe75 (diff) |
After discussing with Ingo and Antoine we decided to rename
files to not include -. This way we can easily overwrite
daemon flags from rc.conf.local.
-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 |