Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/netifrc:master commit in: init.d/
Date: Sun, 21 Apr 2019 05:34:13
Message-Id: 1555824824.b7e61844bd3d66f61ce9967df78a5d30f3be8d00.robbat2@OpenRC
1 commit: b7e61844bd3d66f61ce9967df78a5d30f3be8d00
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 21 05:28:33 2019 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 21 05:33:44 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=b7e61844
7
8 init.d/net.lo.in: shellcheck: stop()
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 init.d/net.lo.in | 10 ++++++----
13 1 file changed, 6 insertions(+), 4 deletions(-)
14
15 diff --git a/init.d/net.lo.in b/init.d/net.lo.in
16 index 9ba2e03..a5ac0fe 100644
17 --- a/init.d/net.lo.in
18 +++ b/init.d/net.lo.in
19 @@ -830,14 +830,16 @@ stop()
20 # correctly if we go back to multiuser.
21 yesno ${keep_network:-YES} && yesno $RC_GOINGDOWN && return 0
22
23 - local IFACE=$(get_interface) module=
24 - local IFVAR=$(shell_var "${IFACE}") opts=
25 + local IFACE='' module=''
26 + local IFVAR=''
27 + IFACE=$(get_interface)
28 + IFVAR=$(shell_var "${IFACE}")
29
30 einfo "Bringing down interface ${IFACE}"
31 eindent
32
33 if [ -z "${MODULES}" ]; then
34 - local MODULES=
35 + local MODULES=''
36 _load_modules false
37 fi
38
39 @@ -883,7 +885,7 @@ stop()
40 # If not in background, and not loopback then bring the interface down
41 # unless overridden.
42 if ! yesno ${IN_BACKGROUND} && \
43 - [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then
44 + [ "${IFACE}" != "lo" ] && [ "${IFACE}" != "lo0" ]; then
45 eval module=\$ifdown_${IFVAR}
46 module=${module:-${ifdown:-YES}}
47 yesno ${module} && _down 2>/dev/null