aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-eth
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth21
1 files changed, 19 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 80b99544..2bc976de 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -57,8 +57,25 @@ if is_bonding_device ${DEVICE} ; then
is_ignored_file "$device" && continue
/sbin/ifdown ${device##*/}
done
- for target in $(cat /sys/class/net/${DEVICE}/bonding/arp_ip_target) ; do
- echo "-${target}" > /sys/class/net/${DEVICE}/bonding/arp_ip_target
+ for arg in $BONDING_OPTS ; do
+ key=${arg%%=*};
+ [[ "${key}" != "arp_ip_target" ]] || continue
+ value=${arg##*=};
+ if [ "${value:0:1}" != "" ]; then
+ OLDIFS=$IFS;
+ IFS=',';
+ for arp_ip in $value; do
+ if grep -q $arp_ip /sys/class/net/${DEVICE}/bonding/arp_ip_target; then
+ echo "-$arp_ip" > /sys/class/net/${DEVICE}/bonding/arp_ip_target
+ fi
+ done
+ IFS=$OLDIFS;
+ else
+ value=${value#};
+ if grep -q $value /sys/class/net/${DEVICE}/bonding/arp_ip_target; then
+ echo "-$value" > /sys/class/net/${DEVICE}/bonding/arp_ip_target
+ fi
+ fi
done
fi