ubuntu-cpc: Mask blkid failure in mount_image

On trusty parted does not create the FS based on the type passed to it.
As a result, calling mount_image for a newly created image will not have
an FS on the root partition.  Calling blkid in mount_image to provide
additional debug output will fail when the root partition has no FS.
The root FS is created after mount_image is called in the hook that
creates the base.ext4 image.  We can ignore the blkid failure as it is
used for debug output; the base image will not have output but derivative
images already have a formatted partition and we'll have handy info.
This commit is contained in:
Robert C Jennings 2017-05-25 20:35:25 -05:00
parent 9cf7b2278f
commit 4a65c41a5e

View File

@ -60,7 +60,7 @@ mount_image() {
# Add some information to the debug logs
echo "Mounted disk image ${backing_img} to ${rootfs_dev_mapper}"
blkid ${rootfs_dev_mapper}
blkid ${rootfs_dev_mapper} || true
return 0
}