diff options
author | Bill Nottingham <notting@redhat.com> | 2004-06-08 20:36:47 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2004-06-08 20:36:47 +0000 |
commit | cc4e3010dd0421e1ff84140d9fa35e9a8d382554 (patch) | |
tree | 148c8b989cce61ec2fa5e4e0dcc94274979b7ece /sysconfig | |
parent | a6fdf4713b125846133ff27dcc03de4c133147bf (diff) | |
download | initscripts-cc4e3010dd0421e1ff84140d9fa35e9a8d382554.tar initscripts-cc4e3010dd0421e1ff84140d9fa35e9a8d382554.tar.gz initscripts-cc4e3010dd0421e1ff84140d9fa35e9a8d382554.tar.bz2 initscripts-cc4e3010dd0421e1ff84140d9fa35e9a8d382554.tar.xz initscripts-cc4e3010dd0421e1ff84140d9fa35e9a8d382554.zip |
cleanup
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index c391cf25..9e89dbd5 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -179,13 +179,10 @@ fi # Bonding initialization. For DHCP, we need to enslave the devices early, # so it can actually get an IP. if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then + /sbin/ip link set dev ${DEVICE} down /sbin/ip link set dev ${DEVICE} up for device in `fgrep -l "MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do if [ "$BOOTPROTO" = "dhcp" ]; then - DEV=$DEVICE - eval $(LANG=C fgrep "DEVICE=" $device) - ifenslave -d $DEV $DEVICE >/dev/null 2>&1 - DEVICE=$DEV /sbin/ifup ${device##*/} fi done @@ -358,17 +355,14 @@ fi # Bonding initialization part II - for static, enslave the devices. For # DHCP, remove any routes for the slaves. if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then - #/sbin/ip link set dev ${DEVICE} up for device in `fgrep -l "MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do - if [ "$BOOTPROTO" != "dhcp" ]; then - /sbin/ifup ${device##*/} - else + if [ "$BOOTPROTO" = "dhcp" ]; then DEV=$DEVICE eval $(LANG=C fgrep "DEVICE=" $device) - ip link set ${DEVICE} up - ip route flush dev ${DEVICE} >/dev/null 2>&1 + ifenslave -d $DEV DEVICE DEVICE=$DEV fi + /sbin/ifup ${device##*/} done fi |