aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-08-16 08:45:04 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-08-16 08:45:04 +0100
commit5d9367d05919b253227a6db1758dee7064077d12 (patch)
tree0c70a5367105de7918d08a36151250db647bd712 /stubdom
parentc3fcb0fd912a3c5ccfbceb2cdf231b42d916c0a2 (diff)
downloadxen-5d9367d05919b253227a6db1758dee7064077d12.tar.gz
xen-5d9367d05919b253227a6db1758dee7064077d12.tar.bz2
xen-5d9367d05919b253227a6db1758dee7064077d12.zip
stubdoms: parse bridge informations
Currently the stubdom-dm script doesn't read the bridge of a vif on xenstore, therefore all the vifs assigned to the stubdom always belong to default bridge. This patch changes the behavior reading the bridge from xenstore and adding the bridge to the stubdom config file. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'stubdom')
-rw-r--r--stubdom/stubdom-dm9
1 files changed, 8 insertions, 1 deletions
diff --git a/stubdom/stubdom-dm b/stubdom/stubdom-dm
index 8faca31843..b76dab278b 100644
--- a/stubdom/stubdom-dm
+++ b/stubdom/stubdom-dm
@@ -143,11 +143,18 @@ do
i=${i%\"}
i=${i#\"}
vif_mac=`xenstore-read $i/mac`
+ vif_bridge=`xenstore-read $i/bridge`
if [ $j -ne 0 ]
then
echo -n "," >> ${stubdom_configdir}/$domname-dm
fi
- echo -n "'mac=$vif_mac'" >> ${stubdom_configdir}/$domname-dm
+ echo -n "'mac=$vif_mac" >> ${stubdom_configdir}/$domname-dm
+ if [ "$vif_bridge" ]
+ then
+ echo -n ",bridge=$vif_bridge'" >> ${stubdom_configdir}/$domname-dm
+ else
+ echo -n "'" >> ${stubdom_configdir}/$domname-dm
+ fi
j=$(( $j + 1 ))
done
echo " ] " >> ${stubdom_configdir}/$domname-dm