aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-07-21 13:22:58 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-07-21 14:03:11 +0200
commited7b48061a72011f43bf862c8036a0294d7a7eb2 (patch)
tree0edc3896c7f72f7cb13b6af12b9c86c8a1abd536
parent518cc24108e7cfcd2836ab62fe7ff70836060fde (diff)
global-functions: $IsTimeSync: drop old code
In RouterOS 7.x the ntp client and server are bundled and unique and can not be unavailable. Also it does no longer have a 'last-adjustment' property...
-rw-r--r--global-functions10
1 files changed, 2 insertions, 8 deletions
diff --git a/global-functions b/global-functions
index 1acf11f..6f1a6c5 100644
--- a/global-functions
+++ b/global-functions
@@ -484,14 +484,8 @@
:global LogPrintExit2;
: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 ([ /system/ntp/client/get status ] = "synchronized") do={
+ :return true;
}
:return false;
}