Change $driver_iso to $fixed_iso

Compatibility for configurations using $driver_iso is preserved.
This commit is contained in:
Martin Wimpress 2021-09-28 15:32:12 +01:00
parent ac13c5875a
commit f60e92d80e
No known key found for this signature in database
GPG key ID: 61DF940515E06DA3
2 changed files with 25 additions and 8 deletions

View file

@ -121,9 +121,11 @@ function make_vm_dir() {
function make_vm_config() {
local IMAGE_FILE=""
local ISO_FILE=""
local IMAGE_TYPE=""
local GUEST=""
IMAGE_FILE="${1}"
ISO_FILE="${2}"
if [[ "${OS}" == *"ubuntu"* ]]; then
GUEST="linux"
IMAGE_TYPE="iso"
@ -142,8 +144,8 @@ guest_os="${GUEST}"
disk_img="${VM_PATH}/disk.qcow2"
${IMAGE_TYPE}="${VM_PATH}/${IMAGE_FILE}"
EOF
if [ -n "${2}" ]; then
echo "driver_iso=${VM_PATH}/${2}" >> "${OS}-${RELEASE}.conf"
if [ -n "${ISO_FILE}" ]; then
echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf"
fi
fi
}