mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
use sys/class/net/*/operstate instead of mii-tool to check ethernet state
This commit is contained in:
parent
37518e99b2
commit
346355bd1a
@ -34,7 +34,7 @@ watch_eth() {
|
||||
count=0
|
||||
while true; do
|
||||
sleep 5
|
||||
if mii-tool $eth 2>&1 | grep "link ok" > /dev/null; then
|
||||
if [ "$(cat /sys/class/net/$eth/operstate 2>/dev/null)" == "up" ]; then
|
||||
count=0
|
||||
else
|
||||
if [ $count -lt $link_watch_timeout ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user