[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.