linux - How to detect the physical connected state of a network cable/connector? - Stack Overflow
You could try this: gw="$(ip route | awk "/^default via/ {print \$3}")" ping -c 1 "$gw" > /dev/null result="$?" as a workaround for the product will be within a LAN using an unknown network configuration and unknown hosts problem. If there is somethin
stackoverflow.com |