mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
been removed. This is fine, in a cleanup script. Signed-off-by: Ewan Mellor <ewan@xensource.com>
23 lines
765 B
Bash
23 lines
765 B
Bash
#! /bin/sh
|
|
|
|
dir=$(dirname "$0")
|
|
. "$dir/xen-hotplug-common.sh"
|
|
|
|
# Claim the lock protecting /etc/xen/scripts/block. This stops a race whereby
|
|
# paths in the store would disappear underneath that script as it attempted to
|
|
# read from the store checking for device sharing.
|
|
# Any other scripts that do similar things will have to have their lock
|
|
# claimed too.
|
|
# This is pretty horrible, but there's not really a nicer way of solving this.
|
|
claim_lock "block"
|
|
|
|
# remove device frontend store entries
|
|
xenstore-rm -t \
|
|
$(xenstore-read "$XENBUS_PATH/frontend" 2>/dev/null) 2>/dev/null || true
|
|
|
|
# remove device backend store entries
|
|
xenstore-rm -t "$XENBUS_PATH" 2>/dev/null || true
|
|
xenstore-rm -t "error/$XENBUS_PATH" 2>/dev/null || true
|
|
|
|
release_lock "block"
|