diff options
author | Harald Hoyer <harald@redhat.com> | 2009-05-04 11:59:32 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2009-05-04 16:05:04 +0200 |
commit | 9df63c38122472b8b939587c0b3fcf009cea8d13 (patch) | |
tree | 4a64cb3536f694551d4d999db132243adc0e77e0 /sysconfig | |
parent | 8db45a87941794fc24bdbf063be71d1eb1b9522b (diff) | |
download | initscripts-9df63c38122472b8b939587c0b3fcf009cea8d13.tar initscripts-9df63c38122472b8b939587c0b3fcf009cea8d13.tar.gz initscripts-9df63c38122472b8b939587c0b3fcf009cea8d13.tar.bz2 initscripts-9df63c38122472b8b939587c0b3fcf009cea8d13.tar.xz initscripts-9df63c38122472b8b939587c0b3fcf009cea8d13.zip |
fixed brigde setup (bug #463014)
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 9feb7981..ab699a82 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -82,20 +82,6 @@ is_available ${REALDEVICE} || { # is the device wireless? If so, configure wireless device specifics is_wireless_device ${DEVICE} && . ./ifup-wireless -if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then - if ! LC_ALL=C /usr/sbin/brctl show | LC_ALL=C grep -q "^${BRIDGE} "; then - /usr/sbin/brctl addbr ${BRIDGE} 2>/dev/null - fi - /sbin/ip addr flush dev ${DEVICE} 2>/dev/null - /sbin/ip link set dev ${DEVICE} up - [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY} - /usr/sbin/brctl addif ${BRIDGE} ${DEVICE} - # Upon adding a device to 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` - exit 0 -fi - # this isn't the same as the MAC in the configuration filename. It is # available as a configuration option in the config file, forcing the kernel # to think an ethernet card has a different MAC address than it really has. @@ -159,6 +145,19 @@ if [ -n "${MTU}" ]; then ip link set dev ${DEVICE} mtu ${MTU} fi +if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then + if ! LC_ALL=C /usr/sbin/brctl show | LC_ALL=C grep -q "^${BRIDGE} "; then + /usr/sbin/brctl addbr ${BRIDGE} 2>/dev/null + fi + /sbin/ip addr flush dev ${DEVICE} 2>/dev/null + /sbin/ip link set dev ${DEVICE} up + [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY} + /usr/sbin/brctl addif ${BRIDGE} ${DEVICE} + # Upon adding a device to 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` + exit 0 +fi if [ -n "${DYNCONFIG}" -a -x /sbin/dhclient ]; then # Remove any temporary references which were previously added to dhclient config |