This commit is contained in:
Alex Haydock 2025-10-13 19:54:25 +01:00
parent f3831046e9
commit e5ba4b7da8
No known key found for this signature in database
GPG Key ID: 991B5784CC0F0336
1 changed files with 3 additions and 3 deletions

View File

@ -733,7 +733,7 @@ function configure_bios() {
# Write destination vars file with correct extension
# based on source format of the EFI_EXTRA_VARS file
QCOW2VARS=$(is_firmware_qcow2 "${EFI_EXTRA_VARS}")
if ["${QCOW2VARS}" = "true"]; then
if [ "${QCOW2VARS}" = "true" ]; then
EFI_VARS="${VMDIR}/OVMF_VARS.qcow2"
else
EFI_VARS="${VMDIR}/OVMF_VARS.fd"
@ -1393,8 +1393,8 @@ function vm_boot() {
if [[ "${boot}" == *"efi"* ]]; then
QCOW2CODE=$(is_firmware_qcow2 "${EFI_CODE}")
QCOW2VARS=$(is_firmware_qcow2 "${EFI_VARS}")
if ["${QCOW2CODE}" = "true"]; then EFI_CODE_FORMAT="qcow2"; else EFI_CODE_FORMAT="raw"; fi
if ["${QCOW2VARS}" = "true"]; then EFI_VARS_FORMAT="qcow2"; else EFI_VARS_FORMAT="raw"; fi
if [ "${QCOW2CODE}" = "true" ]; then EFI_CODE_FORMAT="qcow2"; else EFI_CODE_FORMAT="raw"; fi
if [ "${QCOW2VARS}" = "true" ]; then EFI_VARS_FORMAT="qcow2"; else EFI_VARS_FORMAT="raw"; fi
# shellcheck disable=SC2054
args+=(-global driver=cfi.pflash01,property=secure,value=on
-drive if=pflash,format="${EFI_CODE_FORMAT}",unit=0,file="${EFI_CODE}",readonly=on