mirror of
https://github.com/openwrt/packages.git
synced 2026-10-13 20:57:37 +04:00
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 <dev@brenken.org>
(cherry picked from commit 607b3dd1b5)
This commit is contained in:
3 files changed
+9
-10
No files matched your search
@@ -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 <dev@brenken.org>
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user