Files
xen/tools/hotplug/Linux/xen-backend.agent
2008-11-04 12:13:42 +00:00

40 lines
566 B
Bash

#! /bin/bash
PATH=/etc/xen/scripts:$PATH
. /etc/xen/scripts/locking.sh
claim_lock xenbus_hotplug_global
case "$XENBUS_TYPE" in
tap)
/etc/xen/scripts/blktap "$ACTION"
;;
vbd)
/etc/xen/scripts/block "$ACTION"
;;
vtpm)
/etc/xen/scripts/vtpm "$ACTION"
;;
vif)
[ -n "$script" ] && $script "$ACTION"
;;
vscsi)
/etc/xen/scripts/vscsi "$ACTION"
;;
esac
case "$ACTION" in
add)
;;
remove)
/etc/xen/scripts/xen-hotplug-cleanup
;;
online)
;;
offline)
;;
esac
release_lock xenbus_hotplug_global