Files
xen/tools/examples/xen-backend.agent
T
emellor@leeni.uk.xensource.com 4384b3fc70 Instead of writing errors to
/local/domain/0/backend/<devclass>/<dom>/<devid>/error, write them instead to
/local/domain/0/error/backend/<yada>.  This is not the best place for them
perhaps, but it moves them out of the backend directory, on which the drivers
have a watch.  This fixes the problem whereby writing an error will trigger a
watch, causing the error message to be written again, and repeat.  Fixes bug
#286.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-23 22:34:13 +01:00

37 lines
583 B
Bash
Executable File

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