summaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-11-20 21:34:49 +0000
committerBill Nottingham <notting@redhat.com>2006-11-20 21:34:49 +0000
commit2abfd3b81f6d0898fc10247c1e2de87ac7bb13f3 (patch)
treeaadb402c196b1658308119a79537bd83bd7840b9 /sysconfig/network-scripts
parent04129e68f0374a65cdf3df3b88733581a267613b (diff)
- ifdown: run ifenslave -d on bonding devices (#199706)
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifdown10
1 files changed, 10 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index d0fb95ae..5a440044 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -71,6 +71,12 @@ if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then
fi
fi
+if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then
+ for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do
+ /sbin/ifdown ${device##*/}
+ done
+fi
+
if [ "${NETWORKING_IPV6}" = "yes" ]; then
/etc/sysconfig/network-scripts/ifdown-ipv6 ${CONFIG}
if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -f /var/run/dhcp6c_${DEVICE}.pid ]; then
@@ -109,6 +115,10 @@ if ! [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
else
ip addr flush dev ${REALDEVICE} label ${DEVICE} 2>/dev/null
fi
+
+ if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then
+ /sbin/ifenslave -d ${MASTER} ${DEVICE} 2>/dev/null
+ fi
fi
if [ "${REALDEVICE}" = "${DEVICE}" ]; then