From 8b424e8091b1d35159651ef5976123b5c7f3a980 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 10 Aug 2025 08:02:23 +0800 Subject: [PATCH] =?UTF-8?q?debian:=20=E7=BB=95=E8=BF=87=20debian=2013=20DH?= =?UTF-8?q?CP=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/trans.sh b/trans.sh index 5812a39..b3b753c 100644 --- a/trans.sh +++ b/trans.sh @@ -1063,7 +1063,16 @@ EOF echo "iface $ethx inet6 auto" >>$conf_file elif is_dhcpv6; then - echo "iface $ethx inet6 dhcp" >>$conf_file + # debian 13 使用 ifupdown + dhcpcd-base + # inet/inet6 都配置成 dhcp 时,重启后 dhcpv4 会丢失 + # 手动 systemctl restart networking 后正常 + # 删除 dhcpcd-base 安装 isc-dhcp-client(类似 debian 12 升级到 13),轮到 dhcpv6 丢失 + if { [ "$distro" = debian ] && [ "$releasever" -ge 13 ]; } || + [ "$distro" = kali ]; then + echo "iface $ethx inet6 auto" >>$conf_file + else + echo "iface $ethx inet6 dhcp" >>$conf_file + fi elif is_staticv6; then get_netconf_to ipv6_addr