diff options
author | Roy Marples <roy@marples.name> | 2008-01-30 13:20:47 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-01-30 13:20:47 +0000 |
commit | 0c75e888fcc71599f3a695ae54a7a0b1beb16f0f (patch) | |
tree | d926d469ac53492d7c53ffdae517dc79d0ba1db5 /sh/net.sh | |
parent | 4bdfccc2c2b2fa67d52f62e62775fc00cb5c0599 (diff) |
Allow rc_need to work with net scripts, and allow for loopback also.
Diffstat (limited to 'sh/net.sh')
-rwxr-xr-x | sh/net.sh | 31 |
1 files changed, 14 insertions, 17 deletions
@@ -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 |