windows: 添加 server 2008 / longhorn 防呆设计

This commit is contained in:
bin456789 2024-05-23 10:40:33 +08:00
parent d4f6ac2e56
commit f70a9767a1
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -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'"