diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2019-04-20 22:28:33 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2019-04-20 22:33:44 -0700 |
commit | b7e61844bd3d66f61ce9967df78a5d30f3be8d00 (patch) | |
tree | dd3f5c68e8c177fe7771083ba07312f54f9233e1 | |
parent | init.d/net.lo.in: shellcheck: start() (diff) | |
download | netifrc-b7e61844bd3d66f61ce9967df78a5d30f3be8d00.tar.gz netifrc-b7e61844bd3d66f61ce9967df78a5d30f3be8d00.tar.bz2 netifrc-b7e61844bd3d66f61ce9967df78a5d30f3be8d00.zip |
init.d/net.lo.in: shellcheck: stop()
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r-- | init.d/net.lo.in | 10 |
1 files 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 |