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

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH] safer checks in network-bridge script

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] safer checks in network-bridge script
From: "Charles Coffing" <ccoffing@xxxxxxxxxx>
Date: 2006年3月09日 18:27:33 -0500
Delivery-date: 2006年3月09日 23:28:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The network-bridge script is fragile because of how grep is used. As
one example, if I already have "xenbridge", I can't create "xenbr". 
(It's actually worse than that, because it's even grepping the header
output by brctl show.)
Assuming dom0 is on Linux with /sys mounted (is that a safe
assumption?) we can check for the existence of a bridge, and check if a
device is on the bridge, by looking in /sys. The attached patch does
that.
If that's not a safe assumption, at least add "-w" to the two instances
of grep. Not perfect, but better.

Attachment: xen-network-bridge.diff
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: RE: [Xen-devel] Grant tables from dom0 userspace? , King, Steven R
Next by Date: Re: [Xen-devel] Daily Xen-HVM Builds: cs9186 , Ewan Mellor
Previous by Thread: [Xen-devel] current domU lifecycle work ? , Andrew D. Ball
Next by Thread: Re: [Xen-devel] [PATCH] safer checks in network-bridge script , Ewan Mellor
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /