Line | |
---|
1 | #! /bin/bash |
---|
2 | |
---|
3 | dir=$(dirname "$0") |
---|
4 | . "$dir/xen-hotplug-common.sh" |
---|
5 | |
---|
6 | # Claim the lock protecting /etc/xen/scripts/block. This stops a race whereby |
---|
7 | # paths in the store would disappear underneath that script as it attempted to |
---|
8 | # read from the store checking for device sharing. |
---|
9 | # Any other scripts that do similar things will have to have their lock |
---|
10 | # claimed too. |
---|
11 | # This is pretty horrible, but there's not really a nicer way of solving this. |
---|
12 | claim_lock "block" |
---|
13 | |
---|
14 | # remove device frontend store entries |
---|
15 | xenstore-rm -t \ |
---|
16 | $(xenstore-read "$XENBUS_PATH/frontend" 2>/dev/null) 2>/dev/null || true |
---|
17 | |
---|
18 | # remove device backend store entries |
---|
19 | xenstore-rm -t "$XENBUS_PATH" 2>/dev/null || true |
---|
20 | xenstore-rm -t "error/$XENBUS_PATH" 2>/dev/null || true |
---|
21 | |
---|
22 | release_lock "block" |
---|
Note: See
TracBrowser
for help on using the repository browser.