mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-16 13:04:30 +02:00
drop script 'rotate-ntp'
For RouterOS 6.x a separate package 'ntp' exists. This adds server functionality, but allows ip addresses for the client only. I added the script 'rotate-ntp' to update addresses from names... Now with RouterOS 7.x there's no extra package and the limitation does no longer exist. So let's just drop the script. This adds migration code, that... * removes the script from configuration * removes a scheduler from configuration * sets the configured ntp pool name for ntp client
This commit is contained in:
parent
66b7fccd30
commit
b3de1fad34
7 changed files with 9 additions and 97 deletions
|
@ -10,7 +10,7 @@
|
|||
:local 0 "global-functions";
|
||||
|
||||
# expected configuration version
|
||||
:global ExpectedConfigVersion 80;
|
||||
:global ExpectedConfigVersion 81;
|
||||
|
||||
# global variables not to be changed by user
|
||||
:global GlobalFunctionsReady false;
|
||||
|
@ -1260,14 +1260,6 @@
|
|||
:global TimeIsSync;
|
||||
|
||||
:while ([ $TimeIsSync ] = false) do={
|
||||
:if ([ :len [ /system/script/find where name="rotate-ntp" ] ] > 0 && \
|
||||
([ /system/resource/get uptime ] % (180 * 1000000000)) = 0s) do={
|
||||
:do {
|
||||
/system/script/run rotate-ntp;
|
||||
} on-error={
|
||||
$LogPrintExit2 debug $0 ("Running rotate-ntp failed.") false;
|
||||
}
|
||||
}
|
||||
:delay 1s;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue