feat: Support boot.iso files (#1204)

This commit is contained in:
Kroese 2025-04-14 20:12:37 +02:00 committed by GitHub
parent 46a9295e20
commit 2d065f092d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 6 deletions

View File

@ -226,7 +226,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
```yaml
volumes:
- ./example.iso:/custom.iso
- ./example.iso:/boot.iso
```
Replace the example path `./example.iso` with the filename of your desired ISO file. The value of `VERSION` will be ignored in this case.

View File

@ -222,14 +222,12 @@ abortInstall() {
return 1
}
detectCustom() {
findFile() {
local dir file base
local fname="custom.iso"
local fname="$1"
local boot="$STORAGE/windows.boot"
CUSTOM=""
dir=$(find / -maxdepth 1 -type d -iname "$fname" -print -quit)
[ ! -d "$dir" ] && dir=$(find "$STORAGE" -maxdepth 1 -type d -iname "$fname" -print -quit)
@ -256,12 +254,25 @@ detectCustom() {
[ -z "$size" ] || [[ "$size" == "0" ]] && return 0
ISO="$file"
CUSTOM="$ISO"
CUSTOM="$file"
BOOT="$STORAGE/windows.$size.iso"
return 0
}
detectCustom() {
CUSTOM=""
! findFile "custom.iso" && return 1
[ -n "$CUSTOM" ] && return 0
! findFile "boot.iso" && return 1
[ -n "$CUSTOM" ] && return 0
return 0
}
extractESD() {
local iso="$1"