From b3de1fad3459aa886b3ca3e1f1f91066ab0730b6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 14 Jun 2022 21:17:01 +0200 Subject: 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 --- global-functions | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 7266861..c12bd54 100644 --- a/global-functions +++ b/global-functions @@ -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; } } -- cgit v1.2.3-54-g00ecf