Merge "Refactor unmount_image with unmount_dir"

This commit is contained in:
Jenkins 2014-01-03 10:17:12 +00:00 committed by Gerrit Code Review
commit 09a8fca8d0

View File

@ -22,11 +22,7 @@ function unmount_image () {
# unmount from the chroot
# Don't use TMP_MOUNT_PATH here, it might not have been set.
local MOUNTS
MOUNTS=$(grep < /proc/mounts " $TMP_BUILD_DIR/mnt" | awk '{ print $2 }' | sort -r)
for M in $MOUNTS; do
sudo umount -fl $M || true
done
unmount_dir "$TMP_BUILD_DIR/mnt"
if [ -n "$EXTRA_UNMOUNT" ]; then
$EXTRA_UNMOUNT
fi