From e7f8802bdd46103479b952861238e10b1b3fe92a Mon Sep 17 00:00:00 2001 From: bin456789 Date: Thu, 8 Jan 2026 22:33:43 +0800 Subject: [PATCH] =?UTF-8?q?net:=20=E4=BF=AE=E5=A4=8D=E5=A4=A9=E7=BF=BC?= =?UTF-8?q?=E4=BA=91=E7=94=B5=E8=84=91=20udhcpc=20=E4=B8=8D=E6=96=AD?= =?UTF-8?q?=E5=B0=9D=E8=AF=95=E8=8E=B7=E5=8F=96=E5=8A=A8=E6=80=81=20IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #518 --- initrd-network.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/initrd-network.sh b/initrd-network.sh index e3b21d7..c99a134 100644 --- a/initrd-network.sh +++ b/initrd-network.sh @@ -345,14 +345,14 @@ EOF db_progress INFO netcfg/link_detect_progress else # alpine - # h3c 移动云电脑使用 udhcpc 会重复提示 sending select,无法获得 ipv6 + # h3c 移动云电脑使用 udhcpc 会重复提示 sending select,因此添加 timeout 强制结束进程 # dhcpcd 会配置租约时间,过期会移除 IP,但我们的没有在后台运行 dhcpcd ,因此用 udhcpc method=udhcpc case "$method" in udhcpc) - udhcpc -i "$ethx" -f -q -n || true - udhcpc6 -i "$ethx" -f -q -n || true + timeout $DHCP_TIMEOUT udhcpc -i "$ethx" -f -q -n || true + timeout $DHCP_TIMEOUT udhcpc6 -i "$ethx" -f -q -n || true sleep $DNS_FILE_TIMEOUT # 好像不用等待写入 dns,但是以防万一 ;; dhcpcd)