On Mon, Jan 11, 2021 at 10:53:51AM +0800, Luan Shengde wrote:
- local i
- for i in /sys/class/net/*/
- do
[ "${i#*/lo/}" != "$i" ] && continue
[ "$(cat $i/operstate)" = 'up' ] && return 0
[ "$(cat $i/carrier 2>/dev/null)" = '1' ] && return 0
- done
- ping -c 3 $LKP_SERVER > /dev/null && return 0
in script, ping -c 1 is enough, 3 is a waste of time
ok Thanks, Yinsi
Thanks, Luan Shengde
is_clearlinux && { net_devices_link up -- 2.23.0