From: John Crispin Date: Tue, 21 Apr 2015 13:18:40 +0000 (+0000) Subject: umbim: auto retry when bringup fails X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=905a4596be13e93bcff14a05ab0cba9598c83c2f;p=openwrt%2Fsvn-archive%2Farchive.git umbim: auto retry when bringup fails Signed-off-by: John Crispin SVN-Revision: 45555 --- diff --git a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh index 461e5fa20c..db0c7b0c3c 100755 --- a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh +++ b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh @@ -19,7 +19,7 @@ proto_mbim_init_config() { proto_config_add_string password } -proto_mbim_setup() { +_proto_mbim_setup() { local interface="$1" local tid=2 local ret @@ -140,6 +140,20 @@ proto_mbim_setup() { ubus call network add_dynamic "$(json_dump)" } +proto_mbim_setup() { + local ret + + _proto_mbim_setup $@ + ret=$? + + [ "$ret" = 0 ] || { + logger "mbim bringup failed, retry in 15s" + sleep 15 + } + + return $rt +} + proto_mbim_teardown() { local interface="$1"