mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-06 08:51:10 +00:00
Unmount the image before we convert to qcow2 to avoid corruption
This commit is contained in:
parent
7b2d783047
commit
be817e0bd1
@ -32,6 +32,9 @@ create_derivative "disk" "kvm" #sets ${derivative_img}
|
||||
mount_disk_image ${derivative_img} ${mount_d}
|
||||
|
||||
# unmount disk image and remove created folders on exit
|
||||
# even though we unmount manually before we convert to
|
||||
# qcow2, we have this here just in case we error out before
|
||||
# that step
|
||||
cleanup_kvm() {
|
||||
if [ -d "$mount_d" ]; then
|
||||
umount_disk_image "$mount_d"
|
||||
@ -61,4 +64,10 @@ env DEBIAN_FRONTEND=noninteractive chroot "${mount_d}" apt-get \
|
||||
clean
|
||||
|
||||
create_manifest ${mount_d} livecd.ubuntu-cpc.disk-kvm.manifest
|
||||
|
||||
# unmount disk image to prevent corruption
|
||||
# and remove it so the trap doesn't try to unmount it again
|
||||
umount_disk_image ${mount_d}
|
||||
rm -rf ${mount_d}
|
||||
|
||||
convert_to_qcow2 ${derivative_img} livecd.ubuntu-cpc.disk-kvm.img
|
Loading…
x
Reference in New Issue
Block a user