Update InstallNET.sh

This commit is contained in:
Molly Lau 2023-10-13 20:14:34 +09:00 committed by GitHub
parent 982476e8a8
commit 939dda1ffd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -717,6 +717,7 @@ function getDisk() {
} }
# Redhat cloud init install needs at least 10GB drive space. # Redhat cloud init install needs at least 10GB drive space.
# Windows needs at least 15GB drive space.
diskCapacity=$(lsblk -ipb | grep -w "$IncDisk" | awk {'print $4'}) diskCapacity=$(lsblk -ipb | grep -w "$IncDisk" | awk {'print $4'})
} }
@ -3271,6 +3272,11 @@ if [[ "$targetRelese" == 'AlmaLinux' ]] || [[ "$targetRelese" == 'Rocky' ]]; the
echo -ne "\n[${red}Error${plain}] Minimum system hard drive requirement is 10 GB! \n\n" echo -ne "\n[${red}Error${plain}] Minimum system hard drive requirement is 10 GB! \n\n"
exit 1 exit 1
} }
elif [[ "$targetRelese" == 'Windows' ]]; then
[[ "$diskCapacity" -lt "16106127360" ]] && {
echo -ne "\n[${red}Error${plain}] Minimum system hard drive requirement is 15 GB! \n\n"
exit 1
}
fi fi
echo -ne "\n${aoiBlue}# Formatting and Installing Drives${plain}\n\n" echo -ne "\n${aoiBlue}# Formatting and Installing Drives${plain}\n\n"
[[ "$setDisk" == "all" || -n "$setRaid" ]] && echo "$AllDisks" || echo "$IncDisk" [[ "$setDisk" == "all" || -n "$setRaid" ]] && echo "$AllDisks" || echo "$IncDisk"