if [ "$status" = "free" ] && \
vnconfig /dev/${disk}d $xparams >/dev/null; then
device=/dev/${disk}d
- echo vnconfig /dev/${disk}d $xparams
break
fi
done
if [ x$device = x ] ; then
error "no available vnd device"
fi
- echo xenstore-write $xpath/vnd $device
xenstore-write $xpath/vnd $device
;;
phy)
;;
esac
physical_device=$(stat -f '%r' "$device")
- echo xenstore-write $xpath/physical-device $physical_device
xenstore-write $xpath/physical-device $physical_device
- echo xenstore-write $xpath/hotplug-status connected
xenstore-write $xpath/hotplug-status connected
exit 0
;;
xfid=$(xenstore-read "$xpath/frontend-id")
xhandle=$(xenstore-read "$xpath/handle")
iface=$(xenstore-read "$xpath/vifname")
- echo ifconfig $iface up
ifconfig $iface up
brconfig $xbridge add $iface
- echo brconfig $xbridge add $iface
xenstore-write $xpath/hotplug-status connected
- echo xenstore-write $xpath/hotplug-status connected
exit 0
;;
*)
xfid=$(xenstore-read "$xpath/frontend-id")
xhandle=$(xenstore-read "$xpath/handle")
iface=$(xenstore-read "$xpath/vifname")
- echo ifconfig $iface $xip up
ifconfig $iface $xip up
xenstore-write $xpath/hotplug-status connected
- echo xenstore-write $xpath/hotplug-status connected
exit 0
;;
*)