SVN: rc-scripts/trunk/sysconfig/network-scripts: ifdown ifup
glen
glen at pld-linux.org
Wed Feb 27 11:35:37 CET 2008
Author: glen
Date: Wed Feb 27 11:35:37 2008
New Revision: 9533
Modified:
rc-scripts/trunk/sysconfig/network-scripts/ifdown
rc-scripts/trunk/sysconfig/network-scripts/ifup
Log:
- fix for network script that it does not enslave eth interfaces from it during stop phase (Ilja Bobkeviè)
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifdown
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifdown (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifdown Wed Feb 27 11:35:37 2008
@@ -124,6 +124,25 @@
ip addr del ${IP4ADDR} label ${SUBDEVICE} dev ${DEVICE}
else
ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
+
+ if [ ${DEVICETYPE} = "bond" ]; then
+ if [ ! -x /sbin/ifenslave ]; then
+ nls "%s is missing. Can't continue." "/sbin/ifenslave"
+ exit 1
+ fi
+
+ # get up the bonding device before enslaving
+ if ! check_device_down "${DEVICE}"; then
+ ip link set ${DEVICE} up
+ fi
+
+ for BSVAR in $(awk '/Slave Interface:/{ print $3}' /proc/net/bonding/${DEVICE}); do
+ if [ "${BSVAR}" ]; then
+ ifenslave -d ${DEVICE} $BSVAR
+ fi
+ done
+ fi
+
ip link set ${DEVICE} down
fi
fi
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup Wed Feb 27 11:35:37 2008
@@ -81,6 +81,11 @@
exit 1
fi
+if is_yes "$SLAVE" && [ ! -x /sbin/ifenslave ]; then
+ nls "%s is missing. Can't continue." "/sbin/ifenslave"
+ exit 1
+fi
+
if is_yes "$SLAVE" && [ -n "$MASTER" -a -x /sbin/ifenslave ]; then
RFLAG="" && is_yes "${RECIEVE-ONLY}" && RFLAG="-r"
More information about the pld-cvs-commit
mailing list