Fix broken imagetool.sh --mount (#529)

This commit is contained in:
Bruno Binet 2021-06-24 14:32:01 +02:00 committed by GitHub
parent f9d44edb72
commit 42bbe02c78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,10 +103,12 @@ if [ "${UMOUNT}" = "1" ] && [ -z "${MOUNTPOINT}" ]; then
fi fi
export NBD_DEV="${NBD_DEV:-/dev/nbd1}" export NBD_DEV="${NBD_DEV:-/dev/nbd1}"
export MAP_BOOT_DEV=/dev/mapper/nbd1p1
export MAP_ROOT_DEV=/dev/mapper/nbd1p2
source scripts/qcow2_handling source scripts/qcow2_handling
if [ "${MOUNT}" = "1" ]; then if [ "${MOUNT}" = "1" ]; then
mount_qimage "${MOUNTPOINT}" "${IMAGE}" mount_qimage "${IMAGE}" "${MOUNTPOINT}"
elif [ "${UMOUNT}" = "1" ]; then elif [ "${UMOUNT}" = "1" ]; then
umount_qimage "${MOUNTPOINT}" umount_qimage "${MOUNTPOINT}"
fi fi