mirror of
https://github.com/leitbogioro/Tools.git
synced 2024-11-16 06:05:33 +08:00
Update InstallNET.sh
This commit is contained in:
parent
5a8edbac08
commit
39194e4bde
1 changed files with 1 additions and 1 deletions
|
@ -510,7 +510,7 @@ function transferIPv4AddressFormat() {
|
|||
# Common ranges of IPv4 intranet:
|
||||
# Reference: https://hczhang.cn/network/reserved-ip-addresses.html
|
||||
[[ "$ip4AddrFirst""$ip4AddrSecond" != "$ip4GateFirst""$ip4GateSecond" ]] && {
|
||||
[[ "$ip4GateFirst" == "169" && "$ip4GateSecond" == "254" ]] || [[ "$ip4GateFirst" == "172" && "$ip4GateSecond" -ge "16" && "$ip4GateSecond" -le "31" ]] || [[ "$ip4GateFirst" == "10" && "$ip4GateSecond" -ge "0" && "$ip4GateSecond" -le "255" ]] || [[ "$ip4GateFirst" == "192" && "$ip4GateSecond" == "168" ]] || [[ "$ip4GateFirst" == "127" && "$ip4GateSecond" -ge "0" && "$ip4GateSecond" -le "255" ]] || [[ "$ip4GateFirst" == "198" && "$ip4GateSecond" -ge "18" && "$ip4GateSecond" -le "19" ]] || [[ "$ip4GateFirst" == "100" && "$ip4GateSecond" -ge "64" && "$ip4GateSecond" -le "127" ]] && {
|
||||
[[ "$ip4AddrFirst" != "$ip4GateFirst" ]] || [[ "$ip4GateFirst" == "169" && "$ip4GateSecond" == "254" ]] || [[ "$ip4GateFirst" == "172" && "$ip4GateSecond" -ge "16" && "$ip4GateSecond" -le "31" ]] || [[ "$ip4GateFirst" == "10" && "$ip4GateSecond" -ge "0" && "$ip4GateSecond" -le "255" ]] || [[ "$ip4GateFirst" == "192" && "$ip4GateSecond" == "168" ]] || [[ "$ip4GateFirst" == "127" && "$ip4GateSecond" -ge "0" && "$ip4GateSecond" -le "255" ]] || [[ "$ip4GateFirst" == "198" && "$ip4GateSecond" -ge "18" && "$ip4GateSecond" -le "19" ]] || [[ "$ip4GateFirst" == "100" && "$ip4GateSecond" -ge "64" && "$ip4GateSecond" -le "127" ]] && {
|
||||
# [[ -z "$ip4RouteScopeLink" ]] && ipGate=`ipv4Calc "$1" "$ipPrefix" | grep "FirstIP:" | awk '{print$2}'` || ipGate=`ipv4Calc "$ip4RouteScopeLink" "$ipPrefix" | grep "FirstIP:" | awk '{print$2}'`
|
||||
# Temporary installation of Debian is "BusyBox", it can't handle IPv4 public address and IPv4 private gateway well, so we prefer to use IPv6 to configure network and write static configs for IPv4 in later of installation.
|
||||
[[ "$IPStackType" == "BiStack" ]] && { ipPrefix="$actualIp4Prefix"; ipMask="$actualIp4Subnet"; BiStackPreferIpv6='1'; Network4Config="isStatic"; }
|
||||
|
|
Loading…
Reference in a new issue