parent
5c81661d47
commit
ee2524cd1d
@ -44,9 +44,13 @@ start ()
|
|||||||
ifcount=0
|
ifcount=0
|
||||||
for dev in ${interfaces}; do
|
for dev in ${interfaces}; do
|
||||||
: $((ifcount += 1))
|
: $((ifcount += 1))
|
||||||
read carrier < /sys/class/net/$dev/carrier 2> /dev/null
|
carrier=
|
||||||
[ $carrier -eq 1 ] && : $((carriers += 1))
|
[ -e /sys/class/net/$dev/carrier ] &&
|
||||||
read operstate < /sys/class/net/$dev/operstate 2> /dev/null
|
read carrier < /sys/class/net/$dev/carrier
|
||||||
|
[ "$carrier" = 1 ] && : $((carriers += 1))
|
||||||
|
operstate=
|
||||||
|
[ -e /sys/class/net/$dev/operstate ] &&
|
||||||
|
read operstate < /sys/class/net/$dev/operstate
|
||||||
[ "$operstate" = up ] && : $((configured += 1))
|
[ "$operstate" = up ] && : $((configured += 1))
|
||||||
done
|
done
|
||||||
[ $configured -eq $ifcount ] && [ $carriers -ge 1 ] && break
|
[ $configured -eq $ifcount ] && [ $carriers -ge 1 ] && break
|
||||||
|
Loading…
Reference in New Issue
Block a user