mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-27 03:48:57 +02:00
global-functions: $TimeIsSync: unbreak with bundled ntp client
This commit is contained in:
parent
c8770efd72
commit
d6ce774fd8
1 changed files with 10 additions and 3 deletions
|
@ -640,9 +640,16 @@
|
||||||
|
|
||||||
# check if system time is sync
|
# check if system time is sync
|
||||||
:set TimeIsSync do={
|
:set TimeIsSync do={
|
||||||
:if ([ / system ntp client get enabled ] = true && \
|
:if ([ / system ntp client get enabled ] = true) do={
|
||||||
[ / system ntp client get status ] = "synchronized") do={
|
:do {
|
||||||
:return true;
|
: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 && \
|
:if ([ / ip cloud get update-time ] = true && \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue