From 17e22f232584477c94e3eecf1d47e905e9ec1576 Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Mon, 21 Aug 2023 21:36:37 +0900 Subject: [PATCH] Update InstallNET.sh --- Linux_reinstall/InstallNET.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Linux_reinstall/InstallNET.sh b/Linux_reinstall/InstallNET.sh index 0a54234..cd15506 100644 --- a/Linux_reinstall/InstallNET.sh +++ b/Linux_reinstall/InstallNET.sh @@ -2861,6 +2861,9 @@ if [[ "$ddMode" == '1' ]]; then DDURL="$tmpURL$finalDIST-server-cloudimg-$ubuntuVER.raw" ReleaseName="$targetRelese $finalDIST $ubuntuVER" elif [[ "$targetRelese" == 'Windows' ]]; then +# If the range of IPv4 address is too narrow, it will cause IPv4 address and subnet are added with a fatal by using "CMD(*.bat script)" of +# "wmic nicconfig where ipenabled=true call enablestatic(%staticip%),(%subnetmask%)" on newly installed Windows OS. + [[ "$actualIp4Prefix" -gt "24" ]] && { actualIp4Prefix="24"; actualIp4Subnet=$(netmask "$actualIp4Prefix"); } if [[ -z "$tmpURL" ]]; then tmpURL="https://dl.lamp.sh/vhd" [[ `echo "$finalDIST" | grep -i "server"` ]] && tmpFinalDIST=`echo $finalDIST | awk -F ' |-|_' '{print $2}'`