mirror of
https://github.com/bin456789/reinstall.git
synced 2025-02-07 22:10:07 +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
|
# shellcheck disable=SC2154
|
||||||
is_dhcpv4 && dhcp4=true || dhcp4=false
|
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
|
cat <<EOF >>$ci_file
|
||||||
network:
|
network:
|
||||||
version: 2
|
version: 2
|
||||||
@ -756,7 +756,7 @@ EOF
|
|||||||
if ! is_dhcpv4; then
|
if ! is_dhcpv4; then
|
||||||
dns4_list=$(echo "$dns_list" | grep '\.' || true)
|
dns4_list=$(echo "$dns_list" | grep '\.' || true)
|
||||||
fi
|
fi
|
||||||
if ! (is_slaac || is_dhcpv6); then
|
if ! { is_slaac || is_dhcpv6; }; then
|
||||||
dns6_list=$(echo "$dns_list" | grep ':' || true)
|
dns6_list=$(echo "$dns_list" | grep ':' || true)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user