mirror of
https://github.com/bin456789/reinstall.git
synced 2025-12-10 07:28:56 +08:00
Compare commits
3 Commits
7c19559d86
...
78ba0690f9
| Author | SHA1 | Date | |
|---|---|---|---|
| 78ba0690f9 | |||
| 9e0968eabd | |||
| 3263ea3875 |
22
reinstall.sh
22
reinstall.sh
@ -859,7 +859,7 @@ is_have_arm_version() {
|
||||
|
||||
find_windows_iso() {
|
||||
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."
|
||||
fi
|
||||
|
||||
@ -908,7 +908,8 @@ get_windows_iso_link() {
|
||||
x86) echo _ ;;
|
||||
esac
|
||||
;;
|
||||
homebasic | homepremium | business | ultimate) echo _ ;;
|
||||
homebasic | homepremium | ultimate) echo _ ;;
|
||||
business | enterprise) "$edition" ;;
|
||||
esac
|
||||
;;
|
||||
7)
|
||||
@ -927,10 +928,9 @@ get_windows_iso_link() {
|
||||
professional | enterprise | ultimate) echo "$edition" ;;
|
||||
esac
|
||||
;;
|
||||
# massgrave 不提供 windows 8 下载
|
||||
8.1)
|
||||
8 | 8.1)
|
||||
case "$edition" in
|
||||
'') echo _ ;; # windows 8.1 core
|
||||
'') echo _ ;; # windows 8.x core
|
||||
pro | enterprise) echo "$edition" ;;
|
||||
esac
|
||||
;;
|
||||
@ -1025,7 +1025,7 @@ get_windows_iso_link() {
|
||||
echo server
|
||||
else
|
||||
case "$version" in
|
||||
vista | 7 | 8.1 | 10 | 11)
|
||||
vista | 7 | 8 | 8.1 | 10 | 11)
|
||||
echo "$version"
|
||||
;;
|
||||
esac
|
||||
@ -2343,10 +2343,6 @@ prompt_password() {
|
||||
warn false "Leave blank to use a random password."
|
||||
warn false "不填写则使用随机密码"
|
||||
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
|
||||
if [ -n "$password" ]; then
|
||||
IFS= read -r -p "Retype password: " password_confirm
|
||||
@ -2356,7 +2352,11 @@ prompt_password() {
|
||||
error "Passwords don't match. Try again."
|
||||
fi
|
||||
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
|
||||
fi
|
||||
done
|
||||
|
||||
9
trans.sh
9
trans.sh
@ -6615,12 +6615,17 @@ EOF
|
||||
done
|
||||
|
||||
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
|
||||
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
|
||||
error_and_exit "can't find suitable vmd driver"
|
||||
fi
|
||||
local url
|
||||
url=$(wget -U curl/7.54.1 "$page" -O- |
|
||||
grep -Eio -m1 "\"https://.+/SetupRST\.exe\"" | tr -d '"' | grep .)
|
||||
|
||||
# 注意 intel 禁止了 aria2 下载
|
||||
download $url $drv/SetupRST.exe
|
||||
|
||||
Reference in New Issue
Block a user