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