Update install.sh

This commit is contained in:
Kroese 2024-06-10 14:16:24 +02:00 committed by GitHub
parent 84cd03e54e
commit 8c662b38cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -119,10 +119,11 @@ finishInstall() {
fi
rm -f "$STORAGE/windows.old"
rm -f "$STORAGE/windows.type"
rm -f "$STORAGE/windows.vga"
rm -f "$STORAGE/windows.base"
rm -f "$STORAGE/windows.boot"
rm -f "$STORAGE/windows.mode"
rm -f "$STORAGE/windows.type"
cp -f /run/version "$STORAGE/windows.ver"
@ -155,6 +156,12 @@ finishInstall() {
fi
fi
[[ "${PLATFORM,,}" == "arm64" ]] && VGA="virtio-gpu"
if [ -n "${VGA:-}" ] && [[ "${VGA:-}" != "virtio" ]]; then
echo "$VGA" > "$STORAGE/windows.vga"
fi
if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then
echo "$DISK_TYPE" > "$STORAGE/windows.type"
fi
@ -967,7 +974,14 @@ bootWindows() {
rm -rf "$TMP"
[[ "${PLATFORM,,}" == "arm64" ]] && VGA="virtio-gpu"
if [ -s "$STORAGE/windows.vga" ] && [ -f "$STORAGE/windows.vga" ]; then
VGA=$(<"$STORAGE/windows.vga")
else
if [[ "${PLATFORM,,}" == "arm64" ]]; then
VGA="virtio-gpu"
echo "$VGA" > "$STORAGE/windows.vga"
fi
fi
if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then
DISK_TYPE=$(<"$STORAGE/windows.type")