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

[Xen-devel] bug in default interface number computation


The network-bridge script tries to automatically find the default
network interface number with the following ligne:
vifnum=${vifnum:-$(ip route list | awk '/^default / { print $NF }' | sed

However, this fails on mandriva, because the parsed line is:
default via dev eth0  metric 10

This causes many troubles, such as:

A simple solution is to change the position-based parsing to something
more robust:
vifnum=${vifnum:-$(ip route list | sed 's/.*dev

This is also more robust against default interfaces that would be named
otherwise as dev[0-9].

Xen-devel mailing list



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