From a567ec1e4c04525fd945cc5efd1eeccf2dd5e180 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 22 Oct 2023 17:22:13 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BA=86=20?= =?UTF-8?q?subshell=20=E5=AF=BC=E8=87=B4=20ra=20=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trans.sh b/trans.sh index d9a98df..c162e65 100644 --- a/trans.sh +++ b/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 <>$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