Guillaume Rousse
2006-Dec-14 11:34 UTC
[Xen-devel] bug in default interface number computation
Hello. 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 ''s/^[^0-9]*//'')} However, this fails on mandriva, because the parsed line is: default via 193.55.250.126 dev eth0 metric 10 This causes many troubles, such as: http://article.gmane.org/gmane.comp.emulators.xen.user/17846 A simple solution is to change the position-based parsing to something more robust: vifnum=${vifnum:-$(ip route list 0.0.0.0/0 | sed ''s/.*dev [^0-9]\+\([0-9]\+\).*$/\1/'')} This is also more robust against default interfaces that would be named otherwise as dev[0-9]. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Seemingly Similar Threads
- No peth interface for xenbr4 and xenbr5
- 2.6.26-rc8 pv_ops causes Unhandled invalid opcode fault/trap
- Bug#396477: network-bridge script exits prematurely
- Troubles converting a pv host from dom0-hosted kernel to self-contained kernel
- strange issue with xerox printer: unable to configure driver