diff options
author | John Crispin <john@openwrt.org> | 2015-04-21 13:18:46 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-04-21 13:18:46 +0000 |
commit | f03226afe7dd38b854d890bdbf566152eee9abe8 (patch) | |
tree | a20b940b248e8dc7a25ae1acd2fdcefafd332ee8 /package/network/utils/uqmi | |
parent | acf74d9b6ae3b1e8d73f8b376da1299504483ae2 (diff) | |
download | mtk-20170518-f03226afe7dd38b854d890bdbf566152eee9abe8.zip mtk-20170518-f03226afe7dd38b854d890bdbf566152eee9abe8.tar.gz mtk-20170518-f03226afe7dd38b854d890bdbf566152eee9abe8.tar.bz2 |
uqmi: auto retry when bringup fails
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 45556
Diffstat (limited to 'package/network/utils/uqmi')
-rwxr-xr-x | package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 16 |
1 files changed, 15 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 9ae6016..25e5d1f 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -34,7 +34,7 @@ qmi_wds_release() { 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 @@ proto_qmi_setup() { 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" |