Merge "manage-vdi: Wait until devices have been created before mounting"
This commit is contained in:
commit
c31d192262
@ -41,7 +41,17 @@ function get_mount_device() {
|
|||||||
echo "Failed to find mapping"
|
echo "Failed to find mapping"
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
echo "/dev/mapper/${mapping}"
|
|
||||||
|
local device="/dev/mapper/${mapping}"
|
||||||
|
for (( i = 0; i < 5; i++ )) ; do
|
||||||
|
if [ -b $device ] ; then
|
||||||
|
echo $device
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
echo "ERROR: timed out waiting for dev-mapper"
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
echo "/dev/$dev$part"
|
echo "/dev/$dev$part"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user