From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RaIvD-0006d3-IX for garchives@archives.gentoo.org; Tue, 13 Dec 2011 03:20:51 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 94FDC21C073; Tue, 13 Dec 2011 03:20:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 60EBB21C073 for ; Tue, 13 Dec 2011 03:20:44 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DDCA41B401A for ; Tue, 13 Dec 2011 03:20:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 4FCBD8004A for ; Tue, 13 Dec 2011 03:20:43 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: Subject: [gentoo-commits] proj/openrc:master commit in: net/ X-VCS-Repository: proj/openrc X-VCS-Files: net/bonding.sh X-VCS-Directories: net/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: dd45506a40f3332cef96cc8ca7e258561a200ec0 Date: Tue, 13 Dec 2011 03:20:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 1bb5987e-fb34-4ece-92d7-02b87aa630fe X-Archives-Hash: 53ed42049ad07570d76097cd28ddcad6 commit: dd45506a40f3332cef96cc8ca7e258561a200ec0 Author: Robin H. Johnson gentoo org> AuthorDate: Tue Dec 13 02:12:35 2011 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Tue Dec 13 03:20:39 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3Ddd45506a net/bonding: ensure slave interfaces are down before adding. The old ifenslave binary forcibly set new slave interface to down before adding into the kernel, as a way of show it's version to the kernel. We need to duplicate this so that the kernel doesn't think it's an old ifenslave version using the bonding setup interface. X-Gentoo-Bug: 391881 X-Gentoo-Bug-URL: https://bugs.gentoo.org/391881 Signed-off-by: Robin H. Johnson gentoo.org> Thanks-to: Yun Zheng Hu fox-it.com> --- net/bonding.sh | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/net/bonding.sh b/net/bonding.sh index 5ccd1f5..6a83a8c 100644 --- a/net/bonding.sh +++ b/net/bonding.sh @@ -95,16 +95,22 @@ bonding_pre_start() _up =20 # finally add in slaves + # things needed in the process, and if they are done by ifenslave, open= rc, and/or the kernel. + # down new slave interface: ifenslave, openrc + # set mtu: ifenslave, kernel + # set slave MAC: ifenslave, kernel eoutdent if [ -d /sys/class/net ]; then sys_bonding_path=3D/sys/class/net/"${IFACE}"/bonding if [ -n "${primary}" ]; then + IFACE=3D$primary _down echo "+${primary}" >$sys_bonding_path/slaves echo "${primary}" >$sys_bonding_path/primary fi for s in ${slaves}; do [ "${s}" =3D "${primary}" ] && continue if ! grep -q ${s} $sys_bonding_path/slaves; then + IFACE=3D$s _down echo "+${s}" >$sys_bonding_path/slaves fi done