Update define.sh

This commit is contained in:
Kroese 2025-04-20 19:08:50 +02:00 committed by GitHub
parent 855f83e395
commit 154108830e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1380,7 +1380,8 @@ prepareInstall() {
fi
local pid file setup
local pid=""
local file setup
setup=$(find "$target" -maxdepth 1 -type f -iname setupp.ini -print -quit)
if [ -n "$setup" ]; then
@ -1436,35 +1437,33 @@ prepareInstall() {
local ip="20.20.20.1"
[ -n "${VM_NET_IP:-}" ] && ip="${VM_NET_IP%.*}.1"
# These are not pirated keys, they come from the official MS documentation.
case "${driver,,}" in
"xp" )
if [ -z "$KEY" ] && [[ "$pid" != *"270" ]]; then
if [[ "${arch,,}" == "x86" ]]; then
# Windows XP Professional x86 generic key (no activation, trial-only)
[ -z "$KEY" ] && KEY="DR8GV-C8V6J-BYXHG-7PYJR-DB66Y"
else
# Windows XP Professional x64 generic key (no activation, trial-only)
[ -z "$KEY" ] && KEY="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
fi ;;
# These are not pirated keys, they come from the official MS documentation.
case "${driver,,}" in
"xp" )
"2k3" )
if [[ "${arch,,}" == "x86" ]]; then
# Windows XP Professional x86 generic key (no activation, trial-only)
KEY="DR8GV-C8V6J-BYXHG-7PYJR-DB66Y"
else
# Windows XP Professional x64 generic key (no activation, trial-only)
KEY="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
fi ;;
if [[ "${arch,,}" == "x86" ]]; then
# Windows Server 2003 Standard x86 generic key (no activation, trial-only)
[ -z "$KEY" ] && KEY="QKDCQ-TP2JM-G4MDG-VR6F2-P9C48"
else
# Windows Server 2003 Standard x64 generic key (no activation, trial-only)
[ -z "$KEY" ] && KEY="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY"
fi ;;
"2k3" )
"2k" )
if [[ "${arch,,}" == "x86" ]]; then
# Windows Server 2003 Standard x86 generic key (no activation, trial-only)
KEY="QKDCQ-TP2JM-G4MDG-VR6F2-P9C48"
else
# Windows Server 2003 Standard x64 generic key (no activation, trial-only)
KEY="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY"
fi ;;
KEY="" ;;
esac
* ) error "Unknown version: \"$driver\"" && return 1 ;;
esac
fi
[ -n "$KEY" ] && KEY="ProductID=$KEY"