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:06
Message-Id: 1555824634.bb833bd3afb35960a2faa879220697ea1f596546.robbat2@OpenRC
1 commit: bb833bd3afb35960a2faa879220697ea1f596546
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 21 05:19:44 2019 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 21 05:30:34 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=bb833bd3
7
8 init.d/net.lo.in: shellcheck: _gen_module_list(), _load_modules()
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 3afe046..d9a4d24 100644
17 --- a/init.d/net.lo.in
18 +++ b/init.d/net.lo.in
19 @@ -10,6 +10,7 @@ _config_vars="config metric routes"
20
21 [ -z "${IN_BACKGROUND}" ] && IN_BACKGROUND="NO"
22
23 +# shellcheck disable=SC2034
24 description="Configures network interfaces."
25
26 # Handy var so we don't have to embed new lines everywhere for array splitting
27 @@ -20,6 +21,7 @@ __IFS="
28 : ${INIT:=openrc}
29
30 if [ -f "$SHDIR/functions.sh" ]; then
31 + # shellcheck disable=SC1090
32 . "$SHDIR/functions.sh"
33 else
34 echo "$SHDIR/functions.sh missing. Exiting"
35 @@ -345,6 +347,7 @@ _gen_module_list()
36
37 for MODULE in "${MODULESDIR}"/*.sh; do
38 sh -n "${MODULE}" || continue
39 + # shellcheck disable=SC1090
40 . "${MODULE}" || continue
41 MODULE=${MODULE#${MODULESDIR}/}
42 MODULE=${MODULE%.sh}
43 @@ -414,8 +417,10 @@ _load_modules()
44
45 # Ensure our list is up to date
46 _gen_module_list false
47 + # shellcheck disable=SC1090
48 if ! . "${MODULESLIST}"; then
49 _gen_module_list true
50 + # shellcheck disable=SC1090
51 . "${MODULESLIST}"
52 fi
53
54 @@ -461,6 +466,7 @@ _load_modules()
55 MODULES="${MODULES}${MODULES:+ }${mod}"
56
57 # Now load and wrap our functions
58 + # shellcheck disable=SC1090
59 if ! . "${MODULESDIR}/${mod}.sh"; then
60 eend 1 "${RC_SVCNAME}: error loading module \`${mod}'"
61 exit 1