From 61fb7801bcfa519e59a630c4434c22d26f564185 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 19 Apr 2024 21:40:24 +0200 Subject: [PATCH] fix: Transfer ROM files on old installations --- src/install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/install.sh b/src/install.sh index ca80334..c644314 100644 --- a/src/install.sh +++ b/src/install.sh @@ -1102,8 +1102,14 @@ bootWindows() { # Fall back to secure boot on installations created prior to v2.14 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" + 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