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