fix: Transfer ROM files on old installations

This commit is contained in:
Kroese 2024-04-19 21:40:24 +02:00 committed by GitHub
parent ad5b06da59
commit 61fb7801bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1102,8 +1102,14 @@ bootWindows() {
# Fall back to secure boot on installations created prior to v2.14 # Fall back to secure boot on installations created prior to v2.14
if (( $(echo "$creation < $minimal" | bc -l) )); then if (( $(echo "$creation < $minimal" | bc -l) )); then
if [[ "${BOOT_MODE,,}" == "windows" ]] || [[ "${BOOT_MODE,,}" == "windows_plain" ]]; then if [[ "${BOOT_MODE,,}" == "windows" ]] && [ -f "$STORAGE/windows.rom" ]; then
BOOT_MODE="windows_secure" BOOT_MODE="windows_secure"
if [ -f "$STORAGE/windows.rom" ] && [ ! -f "$STORAGE/$BOOT_MODE.rom" ]; then
mv "$STORAGE/windows.rom" "$STORAGE/$BOOT_MODE.rom"
fi
if [ -f "$STORAGE/windows.vars" ] && [ ! -f "$STORAGE/$BOOT_MODE.vars" ]; then
mv "$STORAGE/windows.vars" "$STORAGE/$BOOT_MODE.vars"
fi
fi fi
fi fi