diff options
author | 2014-08-24 13:29:16 +0000 | |
---|---|---|
committer | 2014-08-24 13:29:16 +0000 | |
commit | d4df3345def50e046c87985d061ee2c05464cbe2 (patch) | |
tree | acddb3ae995aeac4a55f1690a21969e21f3dc14a | |
parent | Fix args to needs_root() when using "disable" (broken in the v1.9 (diff) | |
download | wireguard-openbsd-d4df3345def50e046c87985d061ee2c05464cbe2.tar.xz wireguard-openbsd-d4df3345def50e046c87985d061ee2c05464cbe2.zip |
In debug mode, make it clear when we are using the default flags when
none are set.
initial patch from me but reworked by schwarze@
ok schwarze@
-rw-r--r-- | etc/rc.d/rc.subr | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 0cc69701b3b..7c419fd8633 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.83 2014/08/24 07:55:20 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.84 2014/08/24 13:29:16 ajacoutot Exp $ # # Copyright (c) 2010, 2011, 2014 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -142,10 +142,6 @@ _rc_parse_conf() { done _rc_do _rc_quirks - - if [ -n "${_RC_DEBUG}" ]; then - echo "${_name}_flags >$(eval echo \${${_name}_flags})<" - fi } [ -n "${FUNCS_ONLY}" ] && return @@ -282,6 +278,12 @@ getcap -f /etc/login.conf ${_name} 1>/dev/null 2>&1 && \ [ -n "${_rcuser}" ] && daemon_user=${_rcuser} [ -n "${_rctimeout}" ] && daemon_timeout=${_rctimeout} +if [ -n "${_RC_DEBUG}" ]; then + echo -n "${_name}_flags " + [ -n "${_rcflags}" ] && echo -n "empty, using default " + echo ">${daemon_flags}<" +fi + readonly daemon_class unset _rcflags _rcuser _rctimeout pexp="${daemon}${daemon_flags:+ ${daemon_flags}}" |