public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:openrc-0.9.8.2 commit in: net/
Date: Wed, 25 Jan 2012 18:48:02 +0000 (UTC)	[thread overview]
Message-ID: <85193674dafb1bed7f036f47fce043a20e501d90.robbat2@gentoo> (raw)
Message-ID: <20120125184802.PuLuDyFDqy9z99ubCbvAqQjJz4GJ4wo8z8ao397uqeM@z> (raw)

commit:     85193674dafb1bed7f036f47fce043a20e501d90
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 25 18:30:33 2012 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Jan 25 18:46:25 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=85193674

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 <AT> gentoo.org>

---
 net/bonding.sh |   10 ++++++++--
 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



             reply	other threads:[~2012-01-25 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-25 18:47 Robin H. Johnson [this message]
2012-01-25 18:48 ` [gentoo-commits] proj/openrc:openrc-0.9.8.2 commit in: net/ Robin H. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85193674dafb1bed7f036f47fce043a20e501d90.robbat2@gentoo \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox