From fc57661c122e47a47204b25e975cfe1fa8b41fb8 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Tue, 7 Mar 2017 08:40:54 +0100 Subject: [PATCH] travelmate: update 0.4.2 * optimized connection handling - removed needless timeouts & wireless commits * set the pre-configured reload timeout to a more conservative/realistic value of 30 seconds * further logging tweaks Signed-off-by: Dirk Brenken --- net/travelmate/Makefile | 4 ++-- net/travelmate/files/travelmate.conf | 2 +- net/travelmate/files/travelmate.sh | 17 +++++++---------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index 7d933ec87..5a877c97b 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=travelmate -PKG_VERSION:=0.4.1 -PKG_RELEASE:=2 +PKG_VERSION:=0.4.2 +PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Dirk Brenken diff --git a/net/travelmate/files/travelmate.conf b/net/travelmate/files/travelmate.conf index f51973e9c..d02fffba9 100644 --- a/net/travelmate/files/travelmate.conf +++ b/net/travelmate/files/travelmate.conf @@ -5,7 +5,7 @@ config travelmate 'global' option trm_enabled '0' option trm_debug '0' option trm_active '0' - option trm_maxwait '20' + option trm_maxwait '30' option trm_maxretry '3' option trm_timeout '60' option trm_iw '1' diff --git a/net/travelmate/files/travelmate.sh b/net/travelmate/files/travelmate.sh index 60cd558b3..78bc5df8b 100755 --- a/net/travelmate/files/travelmate.sh +++ b/net/travelmate/files/travelmate.sh @@ -10,12 +10,12 @@ # LC_ALL=C PATH="/usr/sbin:/usr/bin:/sbin:/bin" -trm_ver="0.4.1-2" +trm_ver="0.4.2" trm_sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')" trm_enabled=1 trm_debug=0 trm_active=0 -trm_maxwait=20 +trm_maxwait=30 trm_maxretry=3 trm_timeout=60 trm_iw=1 @@ -150,7 +150,7 @@ f_log() logger -t "travelmate-[${trm_ver}] ${class}" "${log_msg}" if [ "${class}" = "error" ] then - logger -t "travelmate-[${trm_ver}] ${class}" "Please check the readme 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' (${trm_sysver})" + logger -t "travelmate-[${trm_ver}] ${class}" "Please check 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' (${trm_sysver})" f_active exit 255 fi @@ -209,24 +209,21 @@ f_main() if [ -n "$(printf "${ssid_list}" | grep -Fo "${ssid}")" ] && [ "${ap_radio}" = "${sta_radio}" ] then uci -q set wireless."${config}".disabled=0 - uci -q commit wireless ubus call network reload f_check "sta" if [ "${trm_ifstatus}" = "true" ] then - f_log "info " "wwan interface connected to uplink ${ssid} (${cnt}/${trm_maxretry}, ${trm_sysver})" + uci -q commit wireless + f_log "info " "wwan interface connected to uplink ${ssid} (${trm_sysver})" sleep 5 return 0 else - uci -q set wireless."${config}".disabled=1 - uci -q commit wireless + uci -q revert wireless ubus call network reload - f_log "info " "wwan interface can't connect to uplink ${ssid} (${cnt}/${trm_maxretry}, ${trm_sysver})" + f_log "info " "wwan interface can't connect to uplink ${ssid} (${trm_sysver})" fi fi done - else - f_log "info " "empty uplink list (${cnt}/${trm_maxretry}, ${trm_sysver})" fi cnt=$((cnt+1)) sleep 5