aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorThomas Richard <thomas.richard@kontron.com>2020-10-08 14:35:24 +0200
committerDaniel Golle <daniel@makrotopia.org>2020-11-22 21:13:18 +0000
commit2b3a0cabea33763775dbc4b8aab5f54a377bd71e (patch)
treeacd4c6cf4f6835442de2975adef4483517f72721 /package/network
parent6e9b707ee2bd06c180e9acc5224a671f2177b57e (diff)
downloadupstream-2b3a0cabea33763775dbc4b8aab5f54a377bd71e.tar.gz
upstream-2b3a0cabea33763775dbc4b8aab5f54a377bd71e.tar.bz2
upstream-2b3a0cabea33763775dbc4b8aab5f54a377bd71e.zip
uqmi: wait forever registration if timeout set to 0
Give possibility to wait forever the registration by setting timeout option to 0. No timeout can be useful if the interface starts whereas no network is available, because at the end of timeout the interface will be stopped and never restarted. Signed-off-by: Thomas Richard <thomas.richard@kontron.com>
Diffstat (limited to 'package/network')
-rwxr-xr-xpackage/network/utils/uqmi/files/lib/netifd/proto/qmi.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
index 8cbe9e97e7..31c2656142 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -82,7 +82,7 @@ proto_qmi_setup() {
local uninitialized_timeout=0
while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do
[ -e "$device" ] || return 1
- if [ "$uninitialized_timeout" -lt "$timeout" ]; then
+ if [ "$uninitialized_timeout" -lt "$timeout" -o "$timeout" = "0" ]; then
let uninitialized_timeout++
sleep 1;
else
@@ -195,7 +195,7 @@ proto_qmi_setup() {
local registration_timeout=0
while uqmi -s -d "$device" --get-serving-system | grep '"searching"' > /dev/null; do
[ -e "$device" ] || return 1
- if [ "$registration_timeout" -lt "$timeout" ]; then
+ if [ "$registration_timeout" -lt "$timeout" -o "$timeout" = "0" ]; then
let registration_timeout++
sleep 1;
else