1 |
commit: abcc0bd4c372e36cc6e5e46832e7664a72b6bcaa |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 21 05:22:09 2019 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 21 05:32:11 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=abcc0bd4 |
7 |
|
8 |
init.d/net.lo.in: shellcheck: depend() |
9 |
|
10 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
11 |
|
12 |
init.d/net.lo.in | 13 +++++++------ |
13 |
1 file changed, 7 insertions(+), 6 deletions(-) |
14 |
|
15 |
diff --git a/init.d/net.lo.in b/init.d/net.lo.in |
16 |
index 6d6b581..e49278f 100644 |
17 |
--- a/init.d/net.lo.in |
18 |
+++ b/init.d/net.lo.in |
19 |
@@ -34,10 +34,11 @@ MODULESLIST="${RC_SVCDIR}/nettree$(get_interface)" |
20 |
|
21 |
depend() |
22 |
{ |
23 |
- local IFACE=$(get_interface) |
24 |
- local IFVAR=$(shell_var "${IFACE}") |
25 |
+ local IFACE IFVAR |
26 |
+ IFACE=$(get_interface) |
27 |
+ IFVAR=$(shell_var "${IFACE}") |
28 |
|
29 |
- if [ "$RC_UNAME" = Linux -a "$IFACE" != lo ]; then |
30 |
+ if [ "$RC_UNAME" = Linux ] && [ "$IFACE" != lo ]; then |
31 |
need sysfs |
32 |
after modules |
33 |
fi |
34 |
@@ -54,14 +55,14 @@ depend() |
35 |
esac |
36 |
|
37 |
if [ "$(command -v "depend_${IFVAR}")" = "depend_${IFVAR}" ]; then |
38 |
- depend_${IFVAR} |
39 |
+ "depend_${IFVAR}" |
40 |
fi |
41 |
|
42 |
- local dep= prov= |
43 |
+ local dep prov |
44 |
for dep in need use before after provide keyword; do |
45 |
eval prov=\$rc_${dep}_${IFVAR} |
46 |
if [ -n "${prov}" ]; then |
47 |
- ${dep} ${prov} |
48 |
+ "${dep}" "${prov}" |
49 |
ewarn "rc_${dep}_${IFVAR} is deprecated." |
50 |
ewarn "Please use rc_net_${IFVAR}_${dep} instead." |
51 |
fi |