diff options
author | Bill Nottingham <notting@redhat.com> | 2008-09-23 15:11:16 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2008-09-23 15:11:16 -0400 |
commit | f9cfaa365ee15b7cb4585f5220702ac5f39c2743 (patch) | |
tree | c1247816263c1d2190f2e3d2421288d59815a97b /sysconfig/network-scripts/ifup-eth | |
parent | be3157c181cbc8f1aa00e95542641128bcd12406 (diff) | |
download | initscripts-f9cfaa365ee15b7cb4585f5220702ac5f39c2743.tar initscripts-f9cfaa365ee15b7cb4585f5220702ac5f39c2743.tar.gz initscripts-f9cfaa365ee15b7cb4585f5220702ac5f39c2743.tar.bz2 initscripts-f9cfaa365ee15b7cb4585f5220702ac5f39c2743.tar.xz initscripts-f9cfaa365ee15b7cb4585f5220702ac5f39c2743.zip |
Move bridging after bonding. (#449950, <djuran@redhat.com>)
Otherwise, it doesn't work, as the bond has no slaves.
Diffstat (limited to 'sysconfig/network-scripts/ifup-eth')
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 8415960d..b32d1c1f 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -80,23 +80,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 [ ! -d /sys/class/net/${BRIDGE}/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 - if [ -n "$ETHTOOL_OPTS" ] ; then - /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS - fi - [ -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 +142,22 @@ if [ "$ISALIAS" = no ] && is_bonding_device ${DEVICE} ; then done fi +if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then + if [ ! -d /sys/class/net/${BRIDGE}/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 + if [ -n "$ETHTOOL_OPTS" ] ; then + /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS + fi + [ -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 |