mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
core: 修复用了 subshell 导致 ra 信息没有缓存
This commit is contained in:
parent
026b11ba22
commit
a567ec1e4c
4
trans.sh
4
trans.sh
@ -719,7 +719,7 @@ create_cloud_init_network_config() {
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
is_dhcpv4 && dhcp4=true || dhcp4=false
|
||||
(is_dhcpv6 || is_slaac) && dhcp6=true || dhcp6=false
|
||||
{ is_dhcpv6 || is_slaac; } && dhcp6=true || dhcp6=false
|
||||
cat <<EOF >>$ci_file
|
||||
network:
|
||||
version: 2
|
||||
@ -756,7 +756,7 @@ EOF
|
||||
if ! is_dhcpv4; then
|
||||
dns4_list=$(echo "$dns_list" | grep '\.' || true)
|
||||
fi
|
||||
if ! (is_slaac || is_dhcpv6); then
|
||||
if ! { is_slaac || is_dhcpv6; }; then
|
||||
dns6_list=$(echo "$dns_list" | grep ':' || true)
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user