ubuntu-cpc: Fix unmount handling (LP: #1621393)

[Steve Langasek]
  * live-build/ubuntu-cpc/hooks/042-vagrant.binary: fix unmount handling
    so that the teardown is done properly /before/ we try to make an
    image from our filesystem, since otherwise /etc/resolv.conf is broken.
    LP: #1621393.
ubuntu/trusty
Robert C Jennings 8 years ago
parent d94c09e109
commit f83f97bc8b

10
debian/changelog vendored

@ -1,3 +1,13 @@
livecd-rootfs (2.209.18) trusty; urgency=medium
[Steve Langasek]
* live-build/ubuntu-cpc/hooks/042-vagrant.binary: fix unmount handling
so that the teardown is done properly /before/ we try to make an
image from our filesystem, since otherwise /etc/resolv.conf is broken.
LP: #1621393.
-- Robert C Jennings <robert.jennings@canonical.com> Tue, 24 May 2017 14:44:47 -0500
livecd-rootfs (2.209.17) trusty; urgency=medium
[ Louis Zuckerman ]

@ -39,7 +39,9 @@ create_derivative "disk" "vagrant" #sets ${derivative_img}
mount_disk_image ${derivative_img} ${mount_d}
cleanup_vagrant() {
umount_disk_image ${mount_d}
if [ -d "$mount_d" ]; then
umount_disk_image "$mount_d"
fi
rm -rf ${box_d} ${seed_d} ${mount_d} ${derivative_img}
}
trap cleanup_vagrant EXIT
@ -49,6 +51,8 @@ chroot ${mount_d} apt-get update
# avoid pulling into a cloud image.
chroot ${mount_d} apt-get install --no-install-recommends -y virtualbox-guest-utils
chroot ${mount_d} apt-get clean
umount_disk_image "$mount_d"
rmdir "$mount_d"
# Used to identify bits
suite=$(chroot chroot lsb_release -c -s)

Loading…
Cancel
Save