net: 修复天翼云电脑 udhcpc 不断尝试获取动态 IP

fixes #518
This commit is contained in:
bin456789
2026-01-08 22:33:43 +08:00
parent 259bcf7275
commit e7f8802bdd

View File

@ -345,14 +345,14 @@ EOF
db_progress INFO netcfg/link_detect_progress db_progress INFO netcfg/link_detect_progress
else else
# alpine # alpine
# h3c 移动云电脑使用 udhcpc 会重复提示 sending select无法获得 ipv6 # h3c 移动云电脑使用 udhcpc 会重复提示 sending select因此添加 timeout 强制结束进程
# dhcpcd 会配置租约时间,过期会移除 IP但我们的没有在后台运行 dhcpcd ,因此用 udhcpc # dhcpcd 会配置租约时间,过期会移除 IP但我们的没有在后台运行 dhcpcd ,因此用 udhcpc
method=udhcpc method=udhcpc
case "$method" in case "$method" in
udhcpc) udhcpc)
udhcpc -i "$ethx" -f -q -n || true timeout $DHCP_TIMEOUT udhcpc -i "$ethx" -f -q -n || true
udhcpc6 -i "$ethx" -f -q -n || true timeout $DHCP_TIMEOUT udhcpc6 -i "$ethx" -f -q -n || true
sleep $DNS_FILE_TIMEOUT # 好像不用等待写入 dns但是以防万一 sleep $DNS_FILE_TIMEOUT # 好像不用等待写入 dns但是以防万一
;; ;;
dhcpcd) dhcpcd)