From 705e1cc3beb7a0cb3ef53ba18a3ba1fed8f4342c Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Thu, 8 Oct 2026 16:35:55 +0200 Subject: [PATCH] travelmate: update 2.4.9-4 * fix false-positive ntp time sync, e.g. at boot with the sysfixtime clock, no uplink * ntp hotplug: reject events with an invalid stratum * remove the synthetic hotplug trigger from f_system Signed-off-by: Dirk Brenken (cherry picked from commit 607b3dd1b5bb9c4f01f724eb3788fd21517f2250) --- net/travelmate/Makefile | 2 +- net/travelmate/files/25-travelmate.hotplug | 11 ++++++++--- net/travelmate/files/travelmate-functions.sh | 6 ------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index 9064560c57..4fc4088124 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=travelmate PKG_VERSION:=2.4.9 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/travelmate/files/25-travelmate.hotplug b/net/travelmate/files/25-travelmate.hotplug index ff3517577d..738db307ee 100755 --- a/net/travelmate/files/25-travelmate.hotplug +++ b/net/travelmate/files/25-travelmate.hotplug @@ -16,9 +16,14 @@ trm_ntplock="/var/run/travelmate/travelmate.ntp.lock" # check for ntp hotplug event and travelmate service autostart condition # -if mkdir "${trm_ntplock}" 2>/dev/null; then - if [ "${ACTION}" = "stratum" ] && "${trm_init}" enabled; then +case "${stratum}" in +"") ;; +*[!0-9]*) exit 0 ;; +*) [ "${stratum}" -lt "16" ] || exit 0 ;; +esac +if [ "${ACTION}" = "stratum" ] && "${trm_init}" enabled; then + if mkdir "${trm_ntplock}" 2>/dev/null; then . "${trm_funlib}" - f_log "info" "get ntp time sync" + f_log "info" "get ntp time sync (stratum: ${stratum:-"-"})" fi fi diff --git a/net/travelmate/files/travelmate-functions.sh b/net/travelmate/files/travelmate-functions.sh index 2be1a44f7a..e4ecfbf251 100644 --- a/net/travelmate/files/travelmate-functions.sh +++ b/net/travelmate/files/travelmate-functions.sh @@ -75,12 +75,6 @@ f_system() { # [ -z "${trm_cores}" ] && trm_cores="$("${trm_grepcmd}" -cm16 '^processor' /proc/cpuinfo 2>/dev/null)" case "${trm_cores}" in "" | 0 | *[!0-9]*) trm_cores="1" ;; esac - - # trigger ntp sync if no lock file exists (to avoid multiple concurrent calls) - # - if [ ! -d "${trm_ntplock}" ]; then - "${trm_ubuscmd}" -S call hotplug.ntp call '{ "env": [ "ACTION=stratum" ] }' >/dev/null 2>&1 - fi } # command selector