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:
Rusty Bird 2018-01-16 06:19:57 +00:00
parent d2a7cbb83e
commit 9dade5c219
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

View File

@ -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