mirror of
https://github.com/bin456789/reinstall.git
synced 2026-10-04 06:27:49 +08:00
core: 显示网卡稳定时间
This commit is contained in:
@@ -14,6 +14,10 @@ Before=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
||||||
|
StandardOutput=journal+console
|
||||||
|
StandardError=journal+console
|
||||||
|
|
||||||
ExecStart=/usr/bin/env bash /fix-eth-name.sh
|
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 /fix-eth-name.sh
|
||||||
ExecStart=/usr/bin/env rm -f /etc/systemd/system/fix-eth-name.service
|
ExecStart=/usr/bin/env rm -f /etc/systemd/system/fix-eth-name.service
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ while true; do
|
|||||||
|
|
||||||
old_state=$new_state
|
old_state=$new_state
|
||||||
|
|
||||||
|
echo "Waiting for the NICs to be stable (${stable_count}s/10s)..."
|
||||||
|
|
||||||
# 稳定 10 秒后退出循环
|
# 稳定 10 秒后退出循环
|
||||||
if $has_eth && [ "$stable_count" -ge 10 ]; then
|
if $has_eth && [ "$stable_count" -ge 10 ]; then
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user