From 346355bd1ab5dd6eb451871eddc3ccaa4ba3e9d7 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 31 Jul 2016 15:11:39 +0300 Subject: [PATCH] use sys/class/net/*/operstate instead of mii-tool to check ethernet state --- board/common/overlay/etc/init.d/S40network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/common/overlay/etc/init.d/S40network b/board/common/overlay/etc/init.d/S40network index 437d0d6d5d..9bf07f4359 100755 --- a/board/common/overlay/etc/init.d/S40network +++ b/board/common/overlay/etc/init.d/S40network @@ -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