diff options
Diffstat (limited to 'package/network')
-rwxr-xr-x | package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 11 |
1 files changed, 10 insertions, 1 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 560c0b9459..f1a939763a 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -125,9 +125,18 @@ proto_qmi_setup() { uqmi -s -d "$device" --sync > /dev/null 2>&1 echo "Waiting for network registration" + local registration_timeout=0 while uqmi -s -d "$device" --get-serving-system | grep '"searching"' > /dev/null; do [ -e "$device" ] || return 1 - sleep 5; + if [ "$registration_timeout" -lt "$timeout" ]; then + let registration_timeout++ + sleep 1; + else + echo "Network registration failed" + proto_notify_error "$interface" NETWORK_REGISTRATION_FAILED + proto_block_restart "$interface" + return 1 + fi done [ -n "$modes" ] && uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1 |