mirror of
https://github.com/dockur/windows.git
synced 2025-10-28 03:45:48 +00:00
feat: Enable TPM for manual installations
This commit is contained in:
parent
fa6d472878
commit
2a30410cf5
1 changed files with 10 additions and 3 deletions
|
|
@ -236,6 +236,7 @@ skipInstall() {
|
||||||
finishInstall() {
|
finishInstall() {
|
||||||
|
|
||||||
local iso="$1"
|
local iso="$1"
|
||||||
|
local aborted="$2"
|
||||||
|
|
||||||
# Mark ISO as prepared via magic byte
|
# Mark ISO as prepared via magic byte
|
||||||
printf '\x16' | dd of="$iso" bs=1 seek=0 count=1 conv=notrunc status=none
|
printf '\x16' | dd of="$iso" bs=1 seek=0 count=1 conv=notrunc status=none
|
||||||
|
|
@ -249,6 +250,12 @@ finishInstall() {
|
||||||
rm -f "$STORAGE/windows.old"
|
rm -f "$STORAGE/windows.old"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${BOOT_MODE,,}" == "windows" ]] && [[ "${DETECTED,,}" == "win11"* ]]; then
|
||||||
|
if [[ "$MANUAL" == [Yy1]* ]] || [[ "$aborted" == [Yy1]* ]]; then
|
||||||
|
BOOT_MODE="windows_secure"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf "$TMP"
|
rm -rf "$TMP"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
@ -261,7 +268,7 @@ abortInstall() {
|
||||||
mv -f "$iso" "$STORAGE/$BASE"
|
mv -f "$iso" "$STORAGE/$BASE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
finishInstall "$STORAGE/$BASE"
|
finishInstall "$STORAGE/$BASE" "Y"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -312,7 +319,7 @@ startInstall() {
|
||||||
|
|
||||||
if [[ "$magic" == "16" ]]; then
|
if [[ "$magic" == "16" ]]; then
|
||||||
|
|
||||||
if hasDisk || [[ "$MANUAL" = [Yy1]* ]]; then
|
if hasDisk || [[ "$MANUAL" == [Yy1]* ]]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1128,7 +1135,7 @@ if ! buildImage "$DIR"; then
|
||||||
exit 65
|
exit 65
|
||||||
fi
|
fi
|
||||||
|
|
||||||
finishInstall "$STORAGE/$BASE"
|
finishInstall "$STORAGE/$BASE" "N"
|
||||||
|
|
||||||
html "Successfully prepared image for installation..."
|
html "Successfully prepared image for installation..."
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue