Compare commits

..

3 Commits

2 changed files with 18 additions and 13 deletions

View File

@ -859,7 +859,7 @@ is_have_arm_version() {
find_windows_iso() { find_windows_iso() {
parse_windows_image_name || error_and_exit "--image-name wrong: $image_name" parse_windows_image_name || error_and_exit "--image-name wrong: $image_name"
if ! [ "$version" = 8.1 ] && [ -z "$edition" ]; then if ! { [ "$version" = 8 ] || [ "$version" = 8.1 ]; } && [ -z "$edition" ]; then
error_and_exit "Edition is not set." error_and_exit "Edition is not set."
fi fi
@ -908,7 +908,8 @@ get_windows_iso_link() {
x86) echo _ ;; x86) echo _ ;;
esac esac
;; ;;
homebasic | homepremium | business | ultimate) echo _ ;; homebasic | homepremium | ultimate) echo _ ;;
business | enterprise) "$edition" ;;
esac esac
;; ;;
7) 7)
@ -927,10 +928,9 @@ get_windows_iso_link() {
professional | enterprise | ultimate) echo "$edition" ;; professional | enterprise | ultimate) echo "$edition" ;;
esac esac
;; ;;
# massgrave 不提供 windows 8 下载 8 | 8.1)
8.1)
case "$edition" in case "$edition" in
'') echo _ ;; # windows 8.1 core '') echo _ ;; # windows 8.x core
pro | enterprise) echo "$edition" ;; pro | enterprise) echo "$edition" ;;
esac esac
;; ;;
@ -1025,7 +1025,7 @@ get_windows_iso_link() {
echo server echo server
else else
case "$version" in case "$version" in
vista | 7 | 8.1 | 10 | 11) vista | 7 | 8 | 8.1 | 10 | 11)
echo "$version" echo "$version"
;; ;;
esac esac
@ -2343,10 +2343,6 @@ prompt_password() {
warn false "Leave blank to use a random password." warn false "Leave blank to use a random password."
warn false "不填写则使用随机密码" warn false "不填写则使用随机密码"
while true; do while true; do
# 特殊字符列表
# https://learn.microsoft.com/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh994562(v=ws.11)
chars=\''A-Za-z0-9~!@#$%^&*_=+`|(){}[]:;"<>,.?/-'
random_password=$(tr -dc "$chars" </dev/random | head -c16)
IFS= read -r -p "Password: " password IFS= read -r -p "Password: " password
if [ -n "$password" ]; then if [ -n "$password" ]; then
IFS= read -r -p "Retype password: " password_confirm IFS= read -r -p "Retype password: " password_confirm
@ -2356,7 +2352,11 @@ prompt_password() {
error "Passwords don't match. Try again." error "Passwords don't match. Try again."
fi fi
else else
password=$random_password # 特殊字符列表
# https://learn.microsoft.com/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh994562(v=ws.11)
# 有的机器运行 centos 7 ,用 /dev/random 产生 16 位密码,开启了 rngd 也要 5 秒,关闭了 rngd 则长期阻塞
chars=\''A-Za-z0-9~!@#$%^&*_=+`|(){}[]:;"<>,.?/-'
password=$(tr -dc "$chars" </dev/urandom | head -c16)
break break
fi fi
done done

View File

@ -6615,12 +6615,17 @@ EOF
done done
if ! $is_gen11 && [ "$build_ver" -ge 19041 ]; then if ! $is_gen11 && [ "$build_ver" -ge 19041 ]; then
url=https://downloadmirror.intel.com/865363/SetupRST.exe # RST v20 # RST v20
local page=https://www.intel.com/content/www/us/en/download/849936.html
elif [ "$build_ver" -ge 15063 ]; then elif [ "$build_ver" -ge 15063 ]; then
url=https://downloadmirror.intel.com/849934/SetupRST.exe # RST v19 # RST v19
local page=https://www.intel.com/content/www/us/en/download/849933.html
else else
error_and_exit "can't find suitable vmd driver" error_and_exit "can't find suitable vmd driver"
fi fi
local url
url=$(wget -U curl/7.54.1 "$page" -O- |
grep -Eio -m1 "\"https://.+/SetupRST\.exe\"" | tr -d '"' | grep .)
# 注意 intel 禁止了 aria2 下载 # 注意 intel 禁止了 aria2 下载
download $url $drv/SetupRST.exe download $url $drv/SetupRST.exe