[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.0-testing] Fix code which finds the default interface if there are static routes.
# HG changeset patch # User cl349@xxxxxxxxxxxxxxxxxxxx # Node ID 669a737174af5e82d589a584e6f4f904a09aa09c # Parent 5461e2e86e989375b707f25bf93d3d4074b80920 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 5461e2e86e98 -r 669a737174af tools/examples/network-bridge --- a/tools/examples/network-bridge Sun Jun 11 19:28:57 2006 +0100 +++ b/tools/examples/network-bridge Sun Jun 11 20:34:23 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 |