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>
This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2006-05-11 22:39:44 +01:00
1 parent 15efc30a11
commit 8cc76e4aee
1 file changed
+1 -1
+1 -1
View File
@@ -59,7 +59,7 @@ dir=$(dirname "$0")
findCommand "$@"
evalVariables "$@"
vifnum=${vifnum:-$(ip route list | awk '/^default / { sub(/eth/,"",$NF); print $NF }')}
vifnum=${vifnum:-$(ip route list | awk '/^default / { sub(/^(eth|xenbr)/,"",$NF); print $NF }')}
bridge=${bridge:-xenbr${vifnum}}
netdev=${netdev:-eth${vifnum}}
antispoof=${antispoof:-no}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.