block-snapshot: remove R3.2 template commit code
qvm-template-commit does not exist in R4.0, where FileVolume.stop() takes care of committing.
This commit is contained in:
parent
d2a7cbb83e
commit
9dade5c219
@ -158,12 +158,6 @@ case "$command" in
|
|||||||
echo "/dev/mapper/$dm_devname" > "$HOTPLUG_STORE-node"
|
echo "/dev/mapper/$dm_devname" > "$HOTPLUG_STORE-node"
|
||||||
write_dev /dev/mapper/$dm_devname
|
write_dev /dev/mapper/$dm_devname
|
||||||
fi
|
fi
|
||||||
# Save domain name for template commit on device remove
|
|
||||||
domid=$(xenstore_read "$XENBUS_PATH/frontend-id")
|
|
||||||
# Store name of target domain in case of stubdom
|
|
||||||
domid=$(xenstore_read_default "/local/domain/$domid/target" "$domid")
|
|
||||||
domain=$(xl domname $domid)
|
|
||||||
echo $domain > "$HOTPLUG_STORE-domain"
|
|
||||||
|
|
||||||
release_lock "block"
|
release_lock "block"
|
||||||
exit 0
|
exit 0
|
||||||
@ -286,18 +280,6 @@ case "$command" in
|
|||||||
dmsetup remove $snap
|
dmsetup remove $snap
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "$command" = "remove" ]; then
|
|
||||||
# Commit template changes
|
|
||||||
domain=$(cat "$HOTPLUG_STORE-domain")
|
|
||||||
if [ "$domain" ]; then
|
|
||||||
if [ -r /var/lib/qubes/qubes-test.xml -a \
|
|
||||||
"${domain#test-}" != "$domain" ]; then
|
|
||||||
export QUBES_XML_PATH=/var/lib/qubes/qubes-test.xml
|
|
||||||
fi
|
|
||||||
# Dont stop on errors
|
|
||||||
/usr/bin/qvm-template-commit --offline-mode "$domain" || true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e $node ]; then
|
if [ -e $node ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user