aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-04-22 10:08:23 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-04-22 10:08:23 +0200
commitd6ce774fd8abeeca9c2ee30f810cde527ba902b0 (patch)
tree27821f024e17dba722407a08778421252ebc0632
parentc8770efd7222f317ccedf228c0a1cae6c1b16262 (diff)
global-functions: $TimeIsSync: unbreak with bundled ntp client
-rw-r--r--global-functions13
1 files changed, 10 insertions, 3 deletions
diff --git a/global-functions b/global-functions
index 145ec09..d18a859 100644
--- a/global-functions
+++ b/global-functions
@@ -640,9 +640,16 @@
# check if system time is sync
:set TimeIsSync do={
- :if ([ / system ntp client get enabled ] = true && \
- [ / system ntp client get status ] = "synchronized") do={
- :return true;
+ :if ([ / system ntp client get enabled ] = true) do={
+ :do {
+ :if ([ / system ntp client get status ] = "synchronized") do={
+ :return true;
+ }
+ } on-error={
+ :if ([ :typeof [ / system ntp client get last-adjustment ] ] = "time") do={
+ :return true;
+ }
+ }
}
:if ([ / ip cloud get update-time ] = true && \