From b9923ae63875f9dbce97872c5b13546689a01b75 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 23 Jul 2024 00:14:44 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E7=94=B2=E9=AA=A8?= =?UTF-8?q?=E6=96=87=E6=B2=A1=E6=9C=89=20IPv6=20=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=BC=80=E6=9C=BA=E9=9C=80=E8=A6=81=E7=AD=89=20DHCPv6=20?= =?UTF-8?q?=E8=B6=85=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 甲骨文即使没有添加 IPv6 地址,RA DHCPv6 标志也是开的 部分系统开机需要等 DHCPv6 超时 这种情况需要禁用 DHCPv6 --- trans.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/trans.sh b/trans.sh index 282e918..160a1c8 100644 --- a/trans.sh +++ b/trans.sh @@ -487,7 +487,16 @@ is_dhcpv6() { return 1 fi get_netconf_to dhcpv6 + # shellcheck disable=SC2154 + # 甲骨文即使没有添加 IPv6 地址,RA DHCPv6 标志也是开的 + # 部分系统开机需要等 DHCPv6 超时 + # 这种情况需要禁用 DHCPv6 + if [ "$dhcpv6" = 1 ] && ! ip -6 -o addr show scope global dev "$ethx" | grep -q .; then + echo 'DHCPv6 flag is on, but DHCPv6 is not working.' + return 1 + fi + [ "$dhcpv6" = 1 ] }