diff options
author | Colin Guthrie <colin@mageia.org> | 2011-11-03 22:26:54 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-11-03 22:26:54 +0000 |
commit | 1e6179bf54cbc84b4ad33480e7f2f713418bb28a (patch) | |
tree | 794b2654be506d551421bcc47d3ad97822e2861c /sysconfig/network-scripts/ifdown-eth | |
parent | 87589b49d1543595188dcb26aa5a09d33e5e0a4e (diff) | |
parent | 6ce3e4700baa4e37e6b16e4160c00b2ebea58d81 (diff) | |
download | initscripts-1e6179bf54cbc84b4ad33480e7f2f713418bb28a.tar initscripts-1e6179bf54cbc84b4ad33480e7f2f713418bb28a.tar.gz initscripts-1e6179bf54cbc84b4ad33480e7f2f713418bb28a.tar.bz2 initscripts-1e6179bf54cbc84b4ad33480e7f2f713418bb28a.tar.xz initscripts-1e6179bf54cbc84b4ad33480e7f2f713418bb28a.zip |
Merge commit 'initscripts-9.34-1' into mga-34
This brings our fully patched initscripts branch up to version 9.34.
Some code was not easily merged and thus not all functionality relating
to multiple IP addresses per interface were merged in.
Conflicts:
Makefile
lang.csh
lang.sh
prefdm
rc.d/init.d/functions
rc.d/init.d/netfs
rc.d/init.d/network
rc.d/rc
rc.d/rc.local
rc.d/rc.sysinit
service
sysconfig.txt
sysconfig/network-scripts/ifdown-eth
sysconfig/network-scripts/ifup-eth
sysconfig/network-scripts/ifup-ipv6
sysconfig/network-scripts/ifup-sit
sysconfig/network-scripts/ifup-tunnel
sysconfig/network-scripts/network-functions
systemd/system/fedora-sysinit-unhack.service
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 711d3284..684cef73 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -42,13 +42,13 @@ if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then if [ -n "${NEWCONFIG}" ]; then eval $(LANG=C grep -F "DEVICE=" $NEWCONFIG) else - echo $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." + net_log $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." exit 1 fi if [ -n "${NEWCONFIG}" -a "${NEWCONFIG##*/}" != "${CONFIG##*/}" -a "${DEVICE}" = "${REALDEVICE}" ]; then exec /sbin/ifdown ${NEWCONFIG} else - echo $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." + net_log $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." exit 1 fi fi @@ -60,8 +60,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 |