diff options
author | Mike Makonnen <mtm@FreeBSD.org> | 2008-06-23 20:50:11 +0000 |
---|---|---|
committer | Mike Makonnen <mtm@FreeBSD.org> | 2008-06-23 20:50:11 +0000 |
commit | b064049801aa5983971949de85edebe51a775fd2 (patch) | |
tree | 35e85abf7532288a30c2f648031caa7df68cfbbf /etc/rc.d/netif | |
parent | a2c756715976aad86346b31787f0cf20604caaa0 (diff) | |
download | src-test2-b064049801aa5983971949de85edebe51a775fd2.tar.gz src-test2-b064049801aa5983971949de85edebe51a775fd2.zip |
Notes
Diffstat (limited to 'etc/rc.d/netif')
-rw-r--r-- | etc/rc.d/netif | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/etc/rc.d/netif b/etc/rc.d/netif index 8298da495d81..666bec8d858e 100644 --- a/etc/rc.d/netif +++ b/etc/rc.d/netif @@ -85,11 +85,8 @@ network_stop() # cmdifn=$* - echo -n "Stopping network:" - # Deconfigure the interface(s) network_common ifn_stop - echo '.' } # network_common routine @@ -98,7 +95,7 @@ network_stop() # an interface and then calls $routine. network_common() { - local _cooked_list _fail _func + local _cooked_list _fail _func _ok _str _func= @@ -123,12 +120,31 @@ network_common() fi _fail= + _ok= for ifn in ${_cooked_list}; do - if ! ${_func} ${ifn} $2; then + if ${_func} ${ifn} $2; then + _ok="${_ok} ${ifn}" + else _fail="${_fail} ${ifn}" fi done + _str= + if [ -n "${_ok}" ]; then + case ${_func} in + ifn_start) + _str='Starting' + ;; + ifn_stop) + _str='Stopping' + ;; + esac + echo "${_str} Network:${_ok}." + if [ -z "${rc_quiet}" ]; then + /sbin/ifconfig ${_ok} + fi + fi + debug "The following interfaces were not configured: $_fail" } |