mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Hotplug scripts include certain bash-isms that are not supported under some distros' default shell (eg. Ubuntu 6.10's use of dash) Signed-off-by: Alastair Tse <atse@xensource.com>
37 lines
513 B
Bash
Executable File
37 lines
513 B
Bash
Executable File
#! /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"
|
|
;;
|
|
esac
|
|
|
|
case "$ACTION" in
|
|
add)
|
|
;;
|
|
remove)
|
|
/etc/xen/scripts/xen-hotplug-cleanup
|
|
;;
|
|
online)
|
|
;;
|
|
offline)
|
|
;;
|
|
esac
|
|
|
|
release_lock xenbus_hotplug_global
|