mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Correct disk creation/enumeration order
This commit is contained in:
parent
38307c1c0f
commit
a688c798f5
1 changed files with 5 additions and 4 deletions
9
quickemu
9
quickemu
|
@ -82,9 +82,7 @@ function vm_boot() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " - Disk: ${disk_img} (${disk})"
|
echo " - Disk: ${disk_img} (${disk})"
|
||||||
if [ -e ${disk_img} ] && [ ${disk_curr_size} -le ${disk_min_size} ]; then
|
if [ ! -f "${disk_img}" ]; then
|
||||||
echo " Looks unused, booting from ${iso}"
|
|
||||||
elif [ ! -f "${disk_img}" ]; then
|
|
||||||
# If there is no disk image, create a new image.
|
# If there is no disk image, create a new image.
|
||||||
${QEMU_IMG} create -q -f qcow2 "${disk_img}" "${disk}"
|
${QEMU_IMG} create -q -f qcow2 "${disk_img}" "${disk}"
|
||||||
echo " Just created, booting from ${iso}"
|
echo " Just created, booting from ${iso}"
|
||||||
|
@ -92,8 +90,11 @@ function vm_boot() {
|
||||||
echo "ERROR! Failed to create ${disk_img} of ${disk}. Stopping here."
|
echo "ERROR! Failed to create ${disk_img} of ${disk}. Stopping here."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
elif [ -e ${disk_img} ] && [ ${disk_curr_size} -le ${disk_min_size} ]; then
|
||||||
|
echo " Looks unused, booting from ${iso}"
|
||||||
else
|
else
|
||||||
# If there is a disk image, do not boot from the iso
|
# If there is a disk image, that appears to have an install
|
||||||
|
# then do not boot from the iso
|
||||||
iso=""
|
iso=""
|
||||||
fi
|
fi
|
||||||
if [ -e ${disk_img_snapshot} ]; then
|
if [ -e ${disk_img_snapshot} ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue