travelmate: update 1.3.1
authorDirk Brenken <redacted>
Fri, 30 Nov 2018 20:20:46 +0000 (21:20 +0100)
committerDirk Brenken <redacted>
Fri, 30 Nov 2018 20:20:46 +0000 (21:20 +0100)
* 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 <redacted>
net/travelmate/Makefile
net/travelmate/files/travelmate.sh

index 0d8a26a7285c8dc0ed2beac099e39c6e486e0f50..5a21ce4ccb658c0300049e1d915740f718d99ed5 100644 (file)
@@ -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 <dev@brenken.org>
index 8504f0b7b2a70f11ffa15b876980822f65c44ac2..57deb1e5bbeb7193244d6000eaf0643e02f8c104 100755 (executable)
@@ -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
git clone https://git.99rst.org/PROJECT