diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2015-07-15 12:26:26 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2015-07-15 12:26:26 +0000 |
commit | dc870693dad40ef2ed841c02ace4369bd1b7afb0 (patch) | |
tree | a0d5f870b8e3ae04cf553ff40ca9a66fa04c3b90 | |
parent | 0191cfb939df3246ba57537411db4a52a5d4f85a (diff) |
Always use the default flags when running !start.
This is necessary so that rc.d scripts launched with `-f' can be properly
stopped, checked and reloaded.
ok schwarze@
-rw-r--r-- | etc/rc.d/rc.subr | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index e55d92db954..9eef525cee1 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.97 2015/07/15 03:21:38 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.98 2015/07/15 12:26:25 ajacoutot Exp $ # # Copyright (c) 2010, 2011, 2014 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -276,7 +276,10 @@ getcap -f /etc/login.conf ${_name} 1>/dev/null 2>&1 && \ [ -z "${daemon_user}" ] && daemon_user=root [ -z "${daemon_timeout}" ] && daemon_timeout=30 -[ -n "${_RC_FORCE}" ] && [ X"${_rcflags}" = X"NO" ] && unset _rcflags +# use flags from the rc.d script if daemon is not enabled +[ -n "${_RC_FORCE}" -o "$1" != "start" ] && [ X"${_rcflags}" = X"NO" ] && \ + unset _rcflags + [ -n "${_rcflags}" ] && daemon_flags=${_rcflags} [ -n "${_rcuser}" ] && daemon_user=${_rcuser} [ -n "${_rctimeout}" ] && daemon_timeout=${_rctimeout} |