Vars refactor: Replace disk_min_size with DISK_MIN_SIZE

This commit is contained in:
Martin Wimpress 2020-03-21 10:41:25 +00:00
parent 21ff829078
commit 74718b2399
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3

View File

@ -161,7 +161,7 @@ function vm_boot() {
exit 1
else
disk_curr_size=$(stat -c%s "${disk_img}")
if [ ${disk_curr_size} -le ${disk_min_size} ]; then
if [ ${disk_curr_size} -le ${DISK_MIN_SIZE} ]; then
echo " Looks unused, booting from ${iso}"
if [ -z "${iso}" ]; then
echo "ERROR! You haven't specified a .iso image to boot from."
@ -316,13 +316,13 @@ iso=""
driver_iso=""
disk_img=""
disk=""
disk_min_size=$((197632 * 8))
DELETE=0
ENABLE_EFI=0
SNAPSHOT_ACTION=""
SNAPSHOT_TAG=""
STATUSQUO=""
VM=""
readonly DISK_MIN_SIZE=$((197632 * 8))
readonly QEMU="/snap/bin/qemu-virgil"
readonly QEMU_IMG="/snap/bin/qemu-virgil.qemu-img"
readonly LAUNCHER=$(basename $0)