mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
connman: add option to force wait_for_inet_addr even if not configured in oe addon
This commit is contained in:
parent
c369d5f491
commit
ed5c350667
@ -21,16 +21,16 @@
|
|||||||
wait_for_inet_addr () {
|
wait_for_inet_addr () {
|
||||||
if [ -f $CONFIG_CACHE/openelec/network_wait ]; then
|
if [ -f $CONFIG_CACHE/openelec/network_wait ]; then
|
||||||
. $CONFIG_CACHE/openelec/network_wait
|
. $CONFIG_CACHE/openelec/network_wait
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$WAIT_NETWORK" = "true" ] ; then
|
if [ "$WAIT_NETWORK" = "true" -o "$1" == "force" ] ; then
|
||||||
progress "Wait for network"
|
progress "Wait for network"
|
||||||
[ -z "$WAIT_NETWORK_TIME" ] && WAIT_NETWORK_TIME=10
|
[ -z "$WAIT_NETWORK_TIME" ] && WAIT_NETWORK_TIME=10
|
||||||
LOOP_COUNT=$((WAIT_NETWORK_TIME * 5))
|
LOOP_COUNT=$((WAIT_NETWORK_TIME * 5))
|
||||||
for i in $(seq 1 $LOOP_COUNT) ; do
|
for i in $(seq 1 $LOOP_COUNT) ; do
|
||||||
cnt=$(ifconfig | sed -e '/inet addr:/!d' -e '/127.0.0.1/d' |wc -l)
|
cnt=$(ifconfig | sed -e '/inet addr:/!d' -e '/127.0.0.1/d' |wc -l)
|
||||||
[ $cnt -gt 0 ] && break
|
[ $cnt -gt 0 ] && break
|
||||||
usleep 200000
|
usleep 200000
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user