fix(vm_image_util): Unmount STATE before making squashfs

This commit is contained in:
Michael Marineau 2014-01-04 21:39:31 -08:00
parent 15eead682b
commit 3546256597

View File

@ -289,6 +289,12 @@ _write_cpio_disk() {
local dst_dir=$(_dst_dir) local dst_dir=$(_dst_dir)
local vmlinuz_name="$(_dst_name ".vmlinuz")" local vmlinuz_name="$(_dst_name ".vmlinuz")"
# The STATE partition and all of its bind mounts shouldn't be
# packed into the squashfs image. Just ROOT and OEM.
if mountpoint -q "${VM_TMP_ROOT}/media/state"; then
sudo umount --all-targets "${VM_TMP_ROOT}/media/state"
fi
# Build the squashfs, embed squashfs into a gzipped cpio # Build the squashfs, embed squashfs into a gzipped cpio
mkdir -p "${cpio_target}" mkdir -p "${cpio_target}"
pushd "${cpio_target}" >/dev/null pushd "${cpio_target}" >/dev/null