mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 21:56:42 +00:00
connman: add function to try for /sys/class/net/$IFACE/address every 0.5 seconds for 10 seconds, this replaces a general sleep
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
723781c1b4
commit
af4200f983
@ -63,10 +63,17 @@ fi
|
||||
mkdir -p /var/lib/connman
|
||||
|
||||
# NETWORK: ( LAN / WLAN )
|
||||
usleep 2000000 # TODO: wait on udev to load all drivers
|
||||
|
||||
[ -f /sys/class/net/$IFACE/address ] && \
|
||||
IFACE=`cat /sys/class/net/$IFACE/address | sed 's/://g'`
|
||||
for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19; do
|
||||
if [ ! -f /sys/class/net/$IFACE/address ]; then
|
||||
logger -t Connman "### [$i] cannot find /sys/class/net/$IFACE/address ###"
|
||||
else
|
||||
logger -t Connman "### [$i] found /sys/class/net/$IFACE/address, continue ###"
|
||||
IFACE=`cat /sys/class/net/$IFACE/address | sed 's/://g'`
|
||||
break
|
||||
fi
|
||||
usleep 500000
|
||||
done
|
||||
|
||||
if [ "$NETWORK" = "WLAN" -a -n "$SSID" ]; then
|
||||
SSID_HEX=`echo -n "$SSID" | od -tx1 | cut -c8-| tr -d ' \n'`
|
||||
|
Loading…
x
Reference in New Issue
Block a user