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>
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