mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
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...
This commit is contained in:
@@ -484,15 +484,9 @@
|
|||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
|
|
||||||
:if ([ /system/ntp/client/get enabled ] = true) do={
|
:if ([ /system/ntp/client/get enabled ] = true) do={
|
||||||
:do {
|
|
||||||
:if ([ /system/ntp/client/get status ] = "synchronized") do={
|
:if ([ /system/ntp/client/get status ] = "synchronized") do={
|
||||||
:return true;
|
:return true;
|
||||||
}
|
}
|
||||||
} on-error={
|
|
||||||
:if ([ :typeof [ /system/ntp/client/get last-adjustment ] ] = "time") do={
|
|
||||||
:return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user