aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-30 13:20:47 +0000
committerRoy Marples <roy@marples.name>2008-01-30 13:20:47 +0000
commit0c75e888fcc71599f3a695ae54a7a0b1beb16f0f (patch)
treed926d469ac53492d7c53ffdae517dc79d0ba1db5 /sh
parent4bdfccc2c2b2fa67d52f62e62775fc00cb5c0599 (diff)
Allow rc_need to work with net scripts, and allow for loopback also.
Diffstat (limited to 'sh')
-rwxr-xr-xsh/net.sh31
1 files changed, 14 insertions, 17 deletions
diff --git a/sh/net.sh b/sh/net.sh
index 7a304363..4b4469c9 100755
--- a/sh/net.sh
+++ b/sh/net.sh
@@ -21,26 +21,23 @@ depend()
need localmount
after bootmisc
provide net
+
case "${IFACE}" in
lo|lo0);;
- *)
- after net.lo net.lo0
- if type depend_${IFVAR} >/dev/null 2>&1; then
- depend_${IFVAR}
- fi
- local prov=
- eval prov=\$RC_NEED_${IFVAR}
- [ -n "${prov}" ] && need ${prov}
- eval prov=\$RC_USE_${IFVAR}
- [ -n "${prov}" ] && use ${prov}
- eval prov=\$RC_BEFORE_${IFVAR}
- [ -n "${prov}" ] && before ${prov}
- eval prov=\$RC_AFTER_${IFVAR}
- [ -n "${prov}" ] && after ${prov}
- eval prov=\$RC_PROVIDE_${IFVAR}
- [ -n "${prov}" ] && provide ${prov}
- ;;
+ *) after net.lo net.lo0;;
esac
+
+ if type depend_${IFVAR} >/dev/null 2>&1; then
+ depend_${IFVAR}
+ fi
+
+ local dep= prov=
+ for dep in need use before after provide keywords; do
+ eval prov=\$rc_${dep}_${IFVAR}
+ if [ -n "${prov}" ]; then
+ ${dep} ${prov}
+ fi
+ done
}
# Support bash arrays - sigh