From 37ab0bde599d67741310e1a7aec58fe2fb10b547 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Fri, 30 Nov 2018 21:20:46 +0100 Subject: [PATCH] travelmate: update 1.3.1 * remove the "--spider" download option from captive portal detection to make the heartbeat function more robust. Keep the uplink connection 'alive' with all sorts of portals. Signed-off-by: Dirk Brenken --- net/travelmate/Makefile | 2 +- net/travelmate/files/travelmate.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index 0d8a26a72..5a21ce4cc 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=travelmate -PKG_VERSION:=1.3.0 +PKG_VERSION:=1.3.1 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Dirk Brenken diff --git a/net/travelmate/files/travelmate.sh b/net/travelmate/files/travelmate.sh index 8504f0b7b..57deb1e5b 100755 --- a/net/travelmate/files/travelmate.sh +++ b/net/travelmate/files/travelmate.sh @@ -10,7 +10,7 @@ # LC_ALL=C PATH="/usr/sbin:/usr/bin:/sbin:/bin" -trm_ver="1.3.0" +trm_ver="1.3.1" trm_sysver="unknown" trm_enabled=0 trm_debug=0 @@ -207,10 +207,10 @@ f_check() then f_jsnup fi - if [ "${mode}" = "initial" ] && [ "${trm_captive}" -eq 1 ] && [ "${trm_ifstatus}" = "true" ] + if [ "${mode}" = "initial" ] && [ ${trm_captive} -eq 1 ] && [ "${trm_ifstatus}" = "true" ] then - result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) --spider "${trm_captiveurl}" 2>&1 | \ - awk '/^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')" + result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) "${trm_captiveurl}" -O /dev/null 2>&1 | \ + awk '/^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')" if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ]) then trm_connection="${result}/${trm_ifquality}" @@ -223,7 +223,7 @@ f_check() wait=$(( wait + 1 )) sleep 1 done - f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, quality: ${trm_ifquality}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}" + f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, quality: ${trm_ifquality}, result: ${result:-"-"}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}" } # update runtime information