[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix code which finds the default interface if there are static routes.
# HG changeset patch # User cl349@xxxxxxxxxxxxxxxxxxxx # Node ID 32444375fd3da0ddaba3b321e352a33f79d912ea # Parent 1d2a0e2ef8f79b68bc4ca017a4d22c25b06dd51c Fix code which finds the default interface if there are static routes. The current code will break if there are multiple scope global routes since the "ip route list default" command doesn't use "default" as a filter, and will output multiple devices which breaks the rest of the script. Also make the vif/xenbr/eth naming consistent, i.e. if your default network interface is eth1, you get vif1 and xenbr1. Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx> --- tools/examples/network-bridge | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff -r 1d2a0e2ef8f7 -r 32444375fd3d tools/examples/network-bridge --- a/tools/examples/network-bridge Sun May 07 21:41:36 2006 +0100 +++ b/tools/examples/network-bridge Mon May 08 10:36:13 2006 +0100 @@ -59,9 +59,8 @@ findCommand "$@" findCommand "$@" evalVariables "$@" -vifnum=${vifnum:-0} +vifnum=${vifnum:-$(ip route list | awk '/^default / { sub(/eth/,"",$NF); print $NF }')} bridge=${bridge:-xenbr${vifnum}} -netdev=${netdev:-$(ip route list default scope global| awk '{ print $NF }')} netdev=${netdev:-eth${vifnum}} antispoof=${antispoof:-no} _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |