summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-01-25 10:30:33 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2012-01-25 10:46:25 -0800
commit85193674dafb1bed7f036f47fce043a20e501d90 (patch)
treeeff30538ac6fc79dd7c1046965819b0894ddc16e
parenta73c26a70b19ecf237214fe1715a61c876b5c06d (diff)
downloadopenrc-85193674dafb1bed7f036f47fce043a20e501d90.tar.gz
openrc-85193674dafb1bed7f036f47fce043a20e501d90.tar.bz2
openrc-85193674dafb1bed7f036f47fce043a20e501d90.tar.xz
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. Cherry-picked from master/c92f0ab702. 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>
-rw-r--r--net/bonding.sh10
1 files changed, 8 insertions, 2 deletions
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