Merge "Mounting an image requires full path & partition #"

This commit is contained in:
Jenkins 2015-03-09 21:41:23 +00:00 committed by Gerrit Code Review
commit 5642dac0a0

View File

@ -21,5 +21,10 @@ IMAGE=$1
rm -rf /tmp/newimage
mkdir -p /tmp/newimage
qemu-nbd -c /dev/nbd1 $1
mount /dev/nbd1 /tmp/newimage
#qemu-nbd needs the absolute path of the image
qemu-nbd -c /dev/nbd1 `readlink -e $IMAGE`
#mount the first partition
mount /dev/nbd1p1 /tmp/newimage
echo "Image $IMAGE mounted to /tmp/newimage"