From fb00b10669a0b191ba0467f035d45b77bedd9f09 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Jan 2012 10:30:33 -0800 Subject: net/bonding: Fix which interface IPs get added to. The previous bonding change of ensuring interfaces were down to add slave interfaces, but it clobbered the IFACE variable, because it was being passed to a bash function rather than a command. X-Gentoo-Bug: 400613 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=400613 Signed-off-by: Robin H. Johnson --- net/bonding.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/bonding.sh b/net/bonding.sh index 6a83a8c..21c00e3 100644 --- a/net/bonding.sh +++ b/net/bonding.sh @@ -102,15 +102,21 @@ bonding_pre_start() eoutdent if [ -d /sys/class/net ]; then sys_bonding_path=/sys/class/net/"${IFACE}"/bonding + local oiface + oiface=$IFACE if [ -n "${primary}" ]; then - IFACE=$primary _down + IFACE=$primary + _down + IFACE=$oiface echo "+${primary}" >$sys_bonding_path/slaves echo "${primary}" >$sys_bonding_path/primary fi for s in ${slaves}; do [ "${s}" = "${primary}" ] && continue if ! grep -q ${s} $sys_bonding_path/slaves; then - IFACE=$s _down + IFACE=$s + _down + IFACE=$oiface echo "+${s}" >$sys_bonding_path/slaves fi done -- cgit v1.2.3