diff options
author | Miloslav Trmac <mitr@volny.cz> | 2006-03-27 02:12:15 +0000 |
---|---|---|
committer | Miloslav Trmac <mitr@volny.cz> | 2006-03-27 02:12:15 +0000 |
commit | 9b2bf404ff0594fc96c4b230a7b8d384afb14e65 (patch) | |
tree | a6bd69d4ebd3b276d0de403a7e3c8de9cd53bcc0 /sysconfig/network-scripts/ifdown-eth | |
parent | 2a11a3e64d43ef85e91de1051fad9d63d568ff07 (diff) | |
download | initscripts-9b2bf404ff0594fc96c4b230a7b8d384afb14e65.tar initscripts-9b2bf404ff0594fc96c4b230a7b8d384afb14e65.tar.gz initscripts-9b2bf404ff0594fc96c4b230a7b8d384afb14e65.tar.bz2 initscripts-9b2bf404ff0594fc96c4b230a7b8d384afb14e65.tar.xz initscripts-9b2bf404ff0594fc96c4b230a7b8d384afb14e65.zip |
Add support for DHCP on bridges (#125259, original patch by Anders Kaseorg
<anders@kaseorg.com>):
- rc.d/init.d/network: Initialize bridges after bridged interfaces,
deinitialize them before bridged interfaces
- sysconfig/network-scripts/ifdown-eth: Destroy bridges lazily when the last
bridged interface is stopped
- sysconfig/network-scripts/ifup-eth:
* Handle bridges before checking for module presence or wireless devices
* Add bridges lazily when the first bridged interface is started
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 55c02fbd..6651c93f 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -26,8 +26,11 @@ if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then # Upon removing a device from a bridge, # it's necessary to make radvd reload its config [ -r /var/run/radvd/radvd.pid ] && kill -HUP `cat /var/run/radvd/radvd.pid` + if LC_ALL=C /usr/sbin/brctl show | LC_ALL=C grep -q "^${BRIDGE} .*can't get port info"; then + /usr/sbin/brctl delbr ${BRIDGE} + fi exit 0 -fi +fi . /etc/sysconfig/network @@ -108,10 +111,6 @@ if [ "$retcode" = 0 ] ; then # the interface went down. fi -if [ "$TYPE" = "Bridge" -a -x /usr/sbin/brctl ]; then - /usr/sbin/brctl delbr ${DEVICE} -fi - if [ -n "$VLAN" -a -x /sbin/vconfig ]; then # 802.1q VLAN if echo ${DEVICE} | LANG=C egrep -v '(:)' | LANG=C egrep -q '(eth|bond)[0-9][0-9]*\.[0-9][0-9]?[0-9]?[0-9]?' \ |