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:07
Message-Id: 1555824666.d2d52cd821372c65b92d262da66a30794735204c.robbat2@OpenRC
1 commit: d2d52cd821372c65b92d262da66a30794735204c
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 21 05:21:51 2019 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 21 05:31:06 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=d2d52cd8
7
8 init.d/net.lo.in: shellcheck: disable some false positives
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 init.d/net.lo.in | 6 ++++++
13 1 file changed, 6 insertions(+)
14
15 diff --git a/init.d/net.lo.in b/init.d/net.lo.in
16 index d9a4d24..1e5de3c 100644
17 --- a/init.d/net.lo.in
18 +++ b/init.d/net.lo.in
19 @@ -83,6 +83,7 @@ _get_array()
20 {
21 local _a=
22 if [ -n "${BASH}" ]; then
23 + # shellcheck disable=SC2039
24 case "$(declare -p "$1" 2>/dev/null)" in
25 "declare -a "*)
26 ewarn "You are using a bash array for $1."
27 @@ -104,6 +105,7 @@ _get_array()
28 _flatten_array()
29 {
30 if [ -n "${BASH}" ]; then
31 + # shellcheck disable=SC2039
32 case "$(declare -p "$1" 2>/dev/null)" in
33 "declare -a "*)
34 ewarn "You are using a bash array for $1."
35 @@ -111,6 +113,7 @@ _flatten_array()
36 ewarn "Please see net.example for the correct format for $1."
37 eval "set -- \"\${$1[@]}\""
38 for x; do
39 + # shellcheck disable=SC2059
40 printf "'%s' " "$(printf "$x" | sed "s:':'\\\'':g")"
41 done
42 return 0
43 @@ -194,6 +197,7 @@ _netmask2cidr()
44 quad=${quad}${quad:+.}0x${hex%${lastbut2}*}
45 hex=${lastbut2}
46 done
47 + # shellcheck disable=SC2086
48 set -- ${quad}
49 ;;
50 esac
51 @@ -427,6 +431,7 @@ _load_modules()
52 MODULES=
53 if [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then
54 eval mymods=\$modules_${IFVAR}
55 + # shellcheck disable=SC2154
56 [ -z "${mymods}" ] && mymods=${modules}
57 fi
58
59 @@ -627,6 +632,7 @@ start()
60 local IFVAR=$(shell_var "${IFACE}") cmd= our_metric=
61 local metric=0 _up_before_preup
62 eval _up_before_preup="\$up_before_preup_${IFVAR}"
63 + # shellcheck disable=SC2154
64 [ -z "${_up_before_preup}" ] && _up_before_preup=$up_before_preup
65
66 einfo "Bringing up interface ${IFACE}"