From 42f932b856d7e0a840e3a56ce48368df7c3971c1 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 6 Sep 2026 11:31:38 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E6=98=BE=E7=A4=BA=E7=BD=91=E5=8D=A1?= =?UTF-8?q?=E7=A8=B3=E5=AE=9A=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fix-eth-name.service | 4 ++++ fix-eth-name.sh | 2 ++ 2 files changed, 6 insertions(+) diff --git a/fix-eth-name.service b/fix-eth-name.service index 265daf0..384a575 100644 --- a/fix-eth-name.service +++ b/fix-eth-name.service @@ -14,6 +14,10 @@ Before=network.target [Service] Type=oneshot + +StandardOutput=journal+console +StandardError=journal+console + ExecStart=/usr/bin/env bash /fix-eth-name.sh ExecStart=/usr/bin/env rm -f /fix-eth-name.sh ExecStart=/usr/bin/env rm -f /etc/systemd/system/fix-eth-name.service diff --git a/fix-eth-name.sh b/fix-eth-name.sh index 26fc6ee..12ca375 100644 --- a/fix-eth-name.sh +++ b/fix-eth-name.sh @@ -49,6 +49,8 @@ while true; do old_state=$new_state + echo "Waiting for the NICs to be stable (${stable_count}s/10s)..." + # 稳定 10 秒后退出循环 if $has_eth && [ "$stable_count" -ge 10 ]; then break