From 93e83dfc582a78c52549ec3e854ec61d7b097a00 Mon Sep 17 00:00:00 2001 From: baiiylu <62942942+zsbai@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:02:19 +0000 Subject: [PATCH] =?UTF-8?q?nixos:=20=E5=9C=A8=E4=BD=BF=E7=94=A8DHCP?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E6=98=BE=E5=BC=8F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?useDHCP=3Dtrue;=20(#587)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trans.sh b/trans.sh index ce2f4b7..cc610f8 100644 --- a/trans.sh +++ b/trans.sh @@ -1263,6 +1263,13 @@ networking = { EOF for ethx in $(get_eths); do + # ipv4 使用 DHCP 时显式开启 useDHCP + if is_dhcpv4; then + cat <>$conf_file + interfaces.$ethx.useDHCP = true; +EOF + fi + # ipv4 if is_staticv4; then get_netconf_to ipv4_addr