mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
1 parent
15efc30a11
commit
8cc76e4aee
1 file changed
+1
-1
@@ -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}
|
||||
|
||||