WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Make add_to_bridge() always leave the dev

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Make add_to_bridge() always leave the device up even when it bails out due to the device already being present on the bridge.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Aug 2006 16:00:51 +0000
Delivery-date: Tue, 22 Aug 2006 09:01:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Anil Madhavapeddy <anil@xxxxxxxxxxxxx>
# Node ID b688d4a68a3ecd96859b4e38d0eeece2a1e7c24f
# Parent  a4550b7488400c44a9f27c92115c8e364493837a
Make add_to_bridge() always leave the device up even when it bails out due to 
the device already being present on the bridge.
This makes the script more idempotent if run twice (e.g. from hotplug and 
udev), since the second time the device will be taken down and not brought up 
again, leaving the host without networking.

Signed-off-by: Anil Madhavapeddy <anil@xxxxxxxxxxxxx>
---
 tools/examples/xen-network-common.sh |    1 +
 1 files changed, 1 insertion(+)

diff -r a4550b748840 -r b688d4a68a3e tools/examples/xen-network-common.sh
--- a/tools/examples/xen-network-common.sh      Tue Aug 22 12:20:43 2006 +0100
+++ b/tools/examples/xen-network-common.sh      Tue Aug 22 14:59:16 2006 +0100
@@ -143,6 +143,7 @@ add_to_bridge () {
 
     # Don't add $dev to $bridge if it's already on a bridge.
     if [ -e "/sys/class/net/${bridge}/brif/${dev}" ]; then
+       ip link set ${dev} up || true
        return
     fi
     brctl addif ${bridge} ${dev}

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Make add_to_bridge() always leave the device up even when it bails out due to the device already being present on the bridge., Xen patchbot-unstable <=