diff options
author | Bill Nottingham <notting@redhat.com> | 2006-08-01 18:39:06 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2006-08-01 18:39:06 +0000 |
commit | 0b3a2227be2251521a59a9da8eee0d00ce45e6d1 (patch) | |
tree | c0340cb0373008ce9fd95be733ca0442a4038406 /sysconfig | |
parent | a03d315834a5a688bf35fecad1a19f1b61634641 (diff) | |
download | initscripts-0b3a2227be2251521a59a9da8eee0d00ce45e6d1.tar initscripts-0b3a2227be2251521a59a9da8eee0d00ce45e6d1.tar.gz initscripts-0b3a2227be2251521a59a9da8eee0d00ce45e6d1.tar.bz2 initscripts-0b3a2227be2251521a59a9da8eee0d00ce45e6d1.tar.xz initscripts-0b3a2227be2251521a59a9da8eee0d00ce45e6d1.zip |
bring down bonding slaves on ifdown (#199706)
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 6651c93f..b894927b 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -50,6 +50,14 @@ if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then fi fi +if is_bonding_device ${DEVICE} ; then + for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do + is_ignored_file "$device" && continue + /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 @@ -86,6 +94,10 @@ if [ -d "/sys/class/net/${REALDEVICE}" ]; 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 if [ "${REALDEVICE}" = "${DEVICE}" ]; then ip link set dev ${DEVICE} down 2>/dev/null |