Merge "Refactor unmount_image with unmount_dir"
This commit is contained in:
commit
09a8fca8d0
@ -22,11 +22,7 @@ function unmount_image () {
|
|||||||
|
|
||||||
# unmount from the chroot
|
# unmount from the chroot
|
||||||
# Don't use TMP_MOUNT_PATH here, it might not have been set.
|
# Don't use TMP_MOUNT_PATH here, it might not have been set.
|
||||||
local MOUNTS
|
unmount_dir "$TMP_BUILD_DIR/mnt"
|
||||||
MOUNTS=$(grep < /proc/mounts " $TMP_BUILD_DIR/mnt" | awk '{ print $2 }' | sort -r)
|
|
||||||
for M in $MOUNTS; do
|
|
||||||
sudo umount -fl $M || true
|
|
||||||
done
|
|
||||||
if [ -n "$EXTRA_UNMOUNT" ]; then
|
if [ -n "$EXTRA_UNMOUNT" ]; then
|
||||||
$EXTRA_UNMOUNT
|
$EXTRA_UNMOUNT
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user