commit: bb833bd3afb35960a2faa879220697ea1f596546
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 21 05:19:44 2019 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Apr 21 05:30:34 2019 +0000
URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=bb833bd3
init.d/net.lo.in: shellcheck: _gen_module_list(), _load_modules()
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
init.d/net.lo.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/init.d/net.lo.in b/init.d/net.lo.in
index 3afe046..d9a4d24 100644
--- a/init.d/net.lo.in
+++ b/init.d/net.lo.in
@@ -10,6 +10,7 @@ _config_vars="config metric routes"
[ -z "${IN_BACKGROUND}" ] && IN_BACKGROUND="NO"
+# shellcheck disable=SC2034
description="Configures network interfaces."
# Handy var so we don't have to embed new lines everywhere for array splitting
@@ -20,6 +21,7 @@ __IFS="
: ${INIT:=openrc}
if [ -f "$SHDIR/functions.sh" ]; then
+ # shellcheck disable=SC1090
. "$SHDIR/functions.sh"
else
echo "$SHDIR/functions.sh missing. Exiting"
@@ -345,6 +347,7 @@ _gen_module_list()
for MODULE in "${MODULESDIR}"/*.sh; do
sh -n "${MODULE}" || continue
+ # shellcheck disable=SC1090
. "${MODULE}" || continue
MODULE=${MODULE#${MODULESDIR}/}
MODULE=${MODULE%.sh}
@@ -414,8 +417,10 @@ _load_modules()
# Ensure our list is up to date
_gen_module_list false
+ # shellcheck disable=SC1090
if ! . "${MODULESLIST}"; then
_gen_module_list true
+ # shellcheck disable=SC1090
. "${MODULESLIST}"
fi
@@ -461,6 +466,7 @@ _load_modules()
MODULES="${MODULES}${MODULES:+ }${mod}"
# Now load and wrap our functions
+ # shellcheck disable=SC1090
if ! . "${MODULESDIR}/${mod}.sh"; then
eend 1 "${RC_SVCNAME}: error loading module \`${mod}'"
exit 1