Commit f8a59e31 by Frederic Crozat Committed by Stéphane Graber

ensure btrfs subvolume is removed when container creating fails

parent f62b3449
......@@ -249,6 +249,8 @@ cleanup() {
if [ $backingstore = "lvm" ]; then
umount $rootfs
lvremove -f $rootdev
elif [ $backingstore = "btrfs" ]; then
btrfs subvolume delete "$rootfs"
fi
${bindir}/lxc-destroy -n $lxc_name
echo "$(basename $0): aborted" >&2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment