mirror of
https://github.com/bin456789/reinstall.git
synced 2025-02-07 22:10:07 +08:00
core: 在 windows 下找到 ip 时才获取网关
This commit is contained in:
parent
1b9069272d
commit
8dfdce23e3
@ -808,9 +808,9 @@ collect_netconf() {
|
|||||||
# 网关
|
# 网关
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
for gateway in "${gateways[@]}"; do
|
for gateway in "${gateways[@]}"; do
|
||||||
if [[ "$gateway" = *.* ]]; then
|
if [ -n "$ipv4_addr" ] && [[ "$gateway" = *.* ]]; then
|
||||||
ipv4_gateway="$gateway"
|
ipv4_gateway="$gateway"
|
||||||
elif [[ "$gateway" = *:* ]]; then
|
elif [ -n "$ipv6_addr" ] && [[ "$gateway" = *:* ]]; then
|
||||||
ipv6_gateway="$gateway"
|
ipv6_gateway="$gateway"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user