diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-01-25 10:30:33 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-01-25 10:47:37 -0800 |
commit | fb00b10669a0b191ba0467f035d45b77bedd9f09 (patch) | |
tree | d11cb534da68b81d4c894c4a44be353a465c3a38 /net | |
parent | 8b4fc05ff2645b2ecb0f153492f72dd8b39ba431 (diff) |
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 <robbat2@gentoo.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/bonding.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/bonding.sh b/net/bonding.sh index 6a83a8c3..21c00e36 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 |