diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index 1f9935466..c74a33a08 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=travelmate PKG_VERSION:=2.0.2 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/travelmate/files/travelmate_ntp.hotplug b/net/travelmate/files/travelmate_ntp.hotplug index 4a31d5946..2a215e4ba 100755 --- a/net/travelmate/files/travelmate_ntp.hotplug +++ b/net/travelmate/files/travelmate_ntp.hotplug @@ -22,10 +22,14 @@ f_log() fi } -if [ "${ACTION}" = "stratum" ] && [ ! -f "${trm_ntpfile}" ] && \ - [ "$("${trm_init}" enabled; printf "%u" ${?})" = "0" ] +if [ "${ACTION}" = "stratum" ] && [ ! -f "${trm_ntpfile}" ] && [ "$("${trm_init}" enabled; printf "%u" ${?})" = "0" ] then - > "${trm_ntpfile}" - f_log "info" "get ntp time sync" - "${trm_init}" restart + { + flock -xn 1001 + if [ "$?" = "0" ] + then + f_log "info" "get ntp time sync" + "${trm_init}" restart + fi + } 1001>"${trm_ntpfile}" fi