diff --git a/lib/img-functions b/lib/img-functions index 05520440..c1cf17a3 100644 --- a/lib/img-functions +++ b/lib/img-functions @@ -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