Skip to content

Commit

Permalink
travelmate: update 0.4.2
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
dibdot committed Mar 8, 2017
1 parent 437ecb0 commit fc57661
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions net/travelmate/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion net/travelmate/files/travelmate.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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'
17 changes: 7 additions & 10 deletions net/travelmate/files/travelmate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fc57661

Please sign in to comment.