fix: Undefined boot mode (#342)

This commit is contained in:
Kroese 2024-01-17 20:12:13 +01:00 committed by GitHub
parent 53a38d9373
commit ced9942db6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,22 +12,6 @@ else
PROGRESS="--progress=dot:giga" PROGRESS="--progress=dot:giga"
fi fi
if [[ "${BOOT_MODE,,}" == "windows" ]]; then
DEST="$STORAGE/drivers.img"
if [ ! -f "$DEST" ]; then
info "Downloading VirtIO drivers for Windows..."
DRIVERS="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso"
{ wget "$DRIVERS" -O "$DEST" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || :
(( rc != 0 )) && info "Failed to download $DRIVERS, reason: $rc" && rm -f "$DEST"
fi
fi
BASE="boot.img" BASE="boot.img"
[ -f "$STORAGE/$BASE" ] && return 0 [ -f "$STORAGE/$BASE" ] && return 0