Files
xen/tools/examples/xen-backend.agent
T
emellor@leeni.uk.xensource.com c0efb8dc85 Rename the commands inside the hotplug scripts to match those used by hotplug
and udev.  Pass all commands through from xen-backend.agent or
xen-backend.rules rather than second-guessing the individual scripts.  This
should make it easier to tear down devices cleanly, especially the dangling
vifs we are seeing at the moment.

Cope with a missing type node inside the block script, as we don't want to
resurrect a removed node by writing a hotplug error message.

Log failure of iptables command.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-11 18:01:44 +01:00

27 lines
404 B
Bash
Executable File

#! /bin/sh
PATH=/etc/xen/scripts:$PATH
case "$XENBUS_TYPE" in
vbd)
/etc/xen/scripts/block "$ACTION"
;;
vif)
[ -n "$script" ] && $script "$ACTION"
;;
esac
case "$ACTION" in
add)
;;
remove)
# remove device backend store entries
xenstore-rm -t "$XENBUS_PATH" || true
xenstore-rm -t "error/$XENBUS_PATH" || true
;;
online)
;;
offline)
;;
esac