From f70a9767a13c6f6499a7be69f90b9bad7dd97d18 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Thu, 23 May 2024 10:40:33 +0800 Subject: [PATCH] =?UTF-8?q?windows:=20=E6=B7=BB=E5=8A=A0=20server=202008?= =?UTF-8?q?=20/=20longhorn=20=E9=98=B2=E5=91=86=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reinstall.sh b/reinstall.sh index 0e1d807..6d3b46d 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -444,7 +444,13 @@ parse_windows_image_name() { server=server shift 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 @@ -970,6 +976,12 @@ setos() { 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 + test_url $iso 'iso|dos/mbr' eval "${step}_iso='$iso'" eval "${step}_image_name='$image_name'"