From: ajacoutot Date: Sun, 24 Aug 2014 13:29:16 +0000 (+0000) Subject: In debug mode, make it clear when we are using the default flags when X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d4df3345def50e046c87985d061ee2c05464cbe2;p=openbsd 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@ --- 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 # Copyright (c) 2010, 2011 Ingo Schwarze @@ -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}}"