fix: Handle unsupported installation media correctly (#2043)

This commit is contained in:
Kroese
2026-08-04 13:51:09 +02:00
committed by GitHub
parent c212e22073
commit 28792f32a1
+10 -4
View File
@@ -125,7 +125,7 @@ configureMachine() {
fi fi
if ! supportsUnattended "$DETECTED"; then if ! supportsUnattended "$DETECTED"; then
skipUnattended "$dir" "$iso" "$boot" || return 83 skipUnattended "$dir" "$iso" "$boot" "N" || return 83
handled=1 handled=1
return 0 return 0
fi fi
@@ -312,6 +312,7 @@ skipUnattended() {
local dir="$1" local dir="$1"
local iso="$2" local iso="$2"
local boot="$3" local boot="$3"
local aborted="${4:-Y}"
local efi efi32 efi64 local efi efi32 efi64
@@ -350,7 +351,7 @@ skipUnattended() {
fi fi
fi fi
finishInstall "$BOOT" "Y" "$boot" && return 0 finishInstall "$BOOT" "$aborted" "$boot" && return 0
return 1 return 1
} }
@@ -976,8 +977,6 @@ setMachine() {
"reactos" ) "reactos" )
[ -z "${REMOVE:-}" ] && REMOVE="N"
writeState "old" "pc" || return 1 writeState "old" "pc" || return 1
writeState "type" "auto" || return 1 writeState "type" "auto" || return 1
writeState "net" "rtl8139" || return 1 writeState "net" "rtl8139" || return 1
@@ -985,6 +984,13 @@ setMachine() {
esac esac
if [[ "${id,,}" == "reactos" ]] && [ -z "$CUSTOM" ]; then
# The ISO is a Live-CD so we need to disable the data disk
# as it will be always wiped during the next runs currently.
REMOVE="N"
DISK_DISABLE="Y"
fi
restoreMachine || return 1 restoreMachine || return 1
case "${id,,}" in case "${id,,}" in