diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-05-28 10:12:43 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-05-28 10:12:43 +0000 |
commit | 1554a9c1fa7b5b881cd575696bf16883dde100c7 (patch) | |
tree | ed89dcf87edd702999748ca0d8adcdaffd0f6913 /etc/rc.d | |
parent | 765aa58e1c0ceead4ec5df1539b6698b7ef3039c (diff) |
Indent and rename var; no functional change.
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/rc.subr | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 5ea76459079..041540f4f09 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.122 2017/05/28 09:31:45 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.123 2017/05/28 10:12:42 ajacoutot Exp $ # # Copyright (c) 2010, 2011, 2014-2017 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -156,7 +156,8 @@ _rc_parse_conf() { _val=${_val%%#*} _val=${_val%%*([[:blank:]])} # remove leading and trailing quotes (backwards compat) - [[ $_val == @(\"*\"|\'*\') ]] && _val=${_val#?} _val=${_val%?} + [[ $_val == @(\"*\"|\'*\') ]] && + _val=${_val#?} _val=${_val%?} eval "${_key}=\${_val}" done < $_rcfile done @@ -184,7 +185,7 @@ rc_stop() { } rc_cmd() { - local _msg _n _ret + local _to _n _ret [ -n "${1}" ] && echo "${_rc_actions}" | grep -qw -- ${1} || _rc_usage @@ -224,9 +225,9 @@ rc_cmd() { wait ${_TIMERSUB} 2>/dev/null # don't print Alarm clock [[ "${_ret}" == @(0|142) ]] && _rc_do rc_check || break [[ "${_ret}" == 142 ]] && [ X"${rc_bg}" != X"YES" ] && - _msg="timeout" + _to="timeout" _rc_do _rc_write_runfile - _rc_exit ${_msg:=ok} + _rc_exit ${_to:=ok} done # handle failure type rc_post >/dev/null && _rc_do rc_post @@ -312,4 +313,5 @@ readonly daemon_class unset _rcflags _rcrtable _rcuser _rctimeout pexp="${daemon}${daemon_flags:+ ${daemon_flags}}" rcexec="su -l -c ${daemon_class} -s /bin/sh ${daemon_user} -c" -[ "${daemon_rtable}" -eq 0 ] || rcexec="route -T ${daemon_rtable} exec ${rcexec}" +[ "${daemon_rtable}" -eq 0 ] || + rcexec="route -T ${daemon_rtable} exec ${rcexec}" |