ia64/xen-unstable
changeset 10049:062d109ce872
Fix network bridge script to select the right interface when bridge already exists.
If the bridge is already configure, the default route will point
to a xenbr interface and not an eth interface. Handle this case.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
If the bridge is already configure, the default route will point
to a xenbr interface and not an eth interface. Handle this case.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Thu May 11 22:39:44 2006 +0100 (2006-05-11) |
parents | d0c7cc0afd15 |
children | c92fbde4074d |
files | tools/examples/network-bridge |
line diff
1.1 --- a/tools/examples/network-bridge Thu May 11 17:30:50 2006 +0100 1.2 +++ b/tools/examples/network-bridge Thu May 11 22:39:44 2006 +0100 1.3 @@ -59,7 +59,7 @@ dir=$(dirname "$0") 1.4 findCommand "$@" 1.5 evalVariables "$@" 1.6 1.7 -vifnum=${vifnum:-$(ip route list | awk '/^default / { sub(/eth/,"",$NF); print $NF }')} 1.8 +vifnum=${vifnum:-$(ip route list | awk '/^default / { sub(/^(eth|xenbr)/,"",$NF); print $NF }')} 1.9 bridge=${bridge:-xenbr${vifnum}} 1.10 netdev=${netdev:-eth${vifnum}} 1.11 antispoof=${antispoof:-no}