From b7e61844bd3d66f61ce9967df78a5d30f3be8d00 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 20 Apr 2019 22:28:33 -0700 Subject: init.d/net.lo.in: shellcheck: stop() Signed-off-by: Robin H. Johnson --- init.d/net.lo.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.d/net.lo.in b/init.d/net.lo.in index 9ba2e03..a5ac0fe 100644 --- a/init.d/net.lo.in +++ b/init.d/net.lo.in @@ -830,14 +830,16 @@ stop() # correctly if we go back to multiuser. yesno ${keep_network:-YES} && yesno $RC_GOINGDOWN && return 0 - local IFACE=$(get_interface) module= - local IFVAR=$(shell_var "${IFACE}") opts= + local IFACE='' module='' + local IFVAR='' + IFACE=$(get_interface) + IFVAR=$(shell_var "${IFACE}") einfo "Bringing down interface ${IFACE}" eindent if [ -z "${MODULES}" ]; then - local MODULES= + local MODULES='' _load_modules false fi @@ -883,7 +885,7 @@ stop() # If not in background, and not loopback then bring the interface down # unless overridden. if ! yesno ${IN_BACKGROUND} && \ - [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then + [ "${IFACE}" != "lo" ] && [ "${IFACE}" != "lo0" ]; then eval module=\$ifdown_${IFVAR} module=${module:-${ifdown:-YES}} yesno ${module} && _down 2>/dev/null -- cgit v1.2.3-65-gdbad