summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2019-04-20 22:22:09 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2019-04-20 22:32:11 -0700
commitabcc0bd4c372e36cc6e5e46832e7664a72b6bcaa (patch)
tree8832c6c4ca4afab9c3c5a4170d38501620f5cb1d
parentinit.d/net.lo.in: shellcheck: toplevel INIT variable (diff)
downloadnetifrc-abcc0bd4c372e36cc6e5e46832e7664a72b6bcaa.tar.gz
netifrc-abcc0bd4c372e36cc6e5e46832e7664a72b6bcaa.tar.bz2
netifrc-abcc0bd4c372e36cc6e5e46832e7664a72b6bcaa.zip
init.d/net.lo.in: shellcheck: depend()
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--init.d/net.lo.in13
1 files changed, 7 insertions, 6 deletions
diff --git a/init.d/net.lo.in b/init.d/net.lo.in
index 6d6b581..e49278f 100644
--- a/init.d/net.lo.in
+++ b/init.d/net.lo.in
@@ -34,10 +34,11 @@ MODULESLIST="${RC_SVCDIR}/nettree$(get_interface)"
depend()
{
- local IFACE=$(get_interface)
- local IFVAR=$(shell_var "${IFACE}")
+ local IFACE IFVAR
+ IFACE=$(get_interface)
+ IFVAR=$(shell_var "${IFACE}")
- if [ "$RC_UNAME" = Linux -a "$IFACE" != lo ]; then
+ if [ "$RC_UNAME" = Linux ] && [ "$IFACE" != lo ]; then
need sysfs
after modules
fi
@@ -54,14 +55,14 @@ depend()
esac
if [ "$(command -v "depend_${IFVAR}")" = "depend_${IFVAR}" ]; then
- depend_${IFVAR}
+ "depend_${IFVAR}"
fi
- local dep= prov=
+ local dep prov
for dep in need use before after provide keyword; do
eval prov=\$rc_${dep}_${IFVAR}
if [ -n "${prov}" ]; then
- ${dep} ${prov}
+ "${dep}" "${prov}"
ewarn "rc_${dep}_${IFVAR} is deprecated."
ewarn "Please use rc_net_${IFVAR}_${dep} instead."
fi