aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-09-05 20:19:58 +0000
committerBill Nottingham <notting@redhat.com>2003-09-05 20:19:58 +0000
commit33a892ed408ee7132e9342d21442cf13ba32489a (patch)
tree457875338c2776007890c36e48e50281197762cf
parentc2cc0670f00c243cd34f35f940235336063fdd10 (diff)
downloadinitscripts-33a892ed408ee7132e9342d21442cf13ba32489a.tar
initscripts-33a892ed408ee7132e9342d21442cf13ba32489a.tar.gz
initscripts-33a892ed408ee7132e9342d21442cf13ba32489a.tar.bz2
initscripts-33a892ed408ee7132e9342d21442cf13ba32489a.tar.xz
initscripts-33a892ed408ee7132e9342d21442cf13ba32489a.zip
fix bonding+dhcp (#91399); bring bonding device links up, then bring up slaves, then bring up bonding interface fully
-rwxr-xr-xrc.d/init.d/network6
-rwxr-xr-xsysconfig/network-scripts/ifup8
2 files changed, 14 insertions, 0 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index f31becec..fabf2ff4 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -103,6 +103,8 @@ case "$1" in
for i in $interfaces; do
eval $(LANG=C fgrep "DEVICE=" ifcfg-$i)
eval $(LANG=C fgrep "TYPE=" ifcfg-$i)
+ eval $(LANG=C fgrep "SLAVE=" ifcfg-$i)
+
if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi
if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then
@@ -114,6 +116,10 @@ case "$1" in
continue
fi
+ if [ "$SLAVE" = "yes" ]; then
+ continue
+ fi
+
if LANG=C egrep -L "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then
# this loads the module, to preserve ordering
is_available $i
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 123790aa..d50380b2 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -176,6 +176,14 @@ if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" -a \
exit 0
fi
+# master device?
+if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE | grep -q "driver: bonding" ; then
+ /sbin/ip link set ${DEVICE} up
+ for device in `fgrep -l "MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do
+ /sbin/ifup ${device##*/}
+ done
+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.