Author: blogic
Date: 2015-04-21 15:18:46 +0200 (Tue, 21 Apr 2015)
New Revision: 45556

Modified:
   trunk/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
Log:
uqmi: auto retry when bringup fails

Signed-off-by: John Crispin <[email protected]>

Modified: trunk/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
===================================================================
--- trunk/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh      
2015-04-21 13:18:40 UTC (rev 45555)
+++ trunk/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh      
2015-04-21 13:18:46 UTC (rev 45556)
@@ -34,7 +34,7 @@
        uci_revert_state network $interface cid
 }
 
-proto_qmi_setup() {
+_proto_qmi_setup() {
        local interface="$1"
 
        local device apn auth username password pincode delay modes cid pdh
@@ -132,6 +132,20 @@
        ubus call network add_dynamic "$(json_dump)"
 }
 
+proto_qmi_setup() {
+       local ret
+
+       _proto_qmi_setup $@
+       ret=$?
+
+       [ "$ret" = 0 ] || {
+               logger "qmi bringup failed, retry in 15s"
+               sleep 15
+       }
+
+       return $rt
+}
+
 proto_qmi_teardown() {
        local interface="$1"
 
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to