diff --git a/README.en.md b/README.en.md index c77de28..ca20c1f 100644 --- a/README.en.md +++ b/README.en.md @@ -154,7 +154,7 @@ bash reinstall.sh centos 7|9 (9 is stream version) ### Feature 2: DD - Supports gzip, xz formats. -- For machines with static IP, DD Windows, and the script will automatically configure the IP. +- A machine with a static IP running DD Windows will automatically configure the IP, which may take a few minutes to complete after the first boot. > [!TIP] > Can monitor the progress through various methods (SSH, HTTP 80 port, VNC in the background, serial console). diff --git a/README.md b/README.md index 08a0c80..23a257f 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ bash reinstall.sh centos 7|9 (9 为 stream 版本) ### 功能 2: DD - 支持 gzip、xz 格式 -- 静态 IP 的机器 DD Windows,会自动配置好 IP +- 静态 IP 的机器 DD Windows,会自动配置好 IP,可能首次开机后几分钟才完成配置 > [!TIP] > 可通过多种方式(SSH、HTTP 80 端口、后台 VNC、串行控制台)查看安装进度。 diff --git a/reinstall.sh b/reinstall.sh index 3a24963..6e371b4 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -454,11 +454,6 @@ parse_windows_image_name() { fi version=$1 - # 填写 windows longhorn serverdatacenter 时,寻找 windows server 2008 serverdatacenter iso - if [ "$version" = longhorn ]; then - server=server - version=2008 - fi shift if [ "$1" = r2 ]; then @@ -467,8 +462,8 @@ parse_windows_image_name() { fi edition= - for i in "$@"; do - case "$i" in + while [ $# -gt 0 ]; do + case "$1" in # windows 10 enterprise n ltsc 2021 k | n | kn) ;; *) @@ -972,15 +967,16 @@ setos() { setos_windows() { if [ -z "$iso" ]; then + # 查找时将 windows longhorn serverdatacenter 改成 windows server 2008 serverdatacenter + image_name=${image_name/windows longhorn server/windows server 2008 server} echo "iso url is not set. Try to find it." find_windows_iso fi - # 防呆设计 - # 将 windows server 2008 改成 windows longhorn - if ! echo "$image_name" | grep -q r2; then - image_name=${image_name/server 2008/longhorn} - fi + # 将上面的 windows server 2008 serverdatacenter 改回 windows longhorn serverdatacenter + # 也能纠正用户输入了 windows server 2008 serverdatacenter + # 注意 windows server 2008 r2 serverdatacenter 不用改 + image_name=${image_name/windows server 2008 server/windows longhorn server} test_url $iso 'iso|dos/mbr' eval "${step}_iso='$iso'"