[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [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.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |