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-config.changes | 2 ++ 1 file changed, 2 insertions(+) (limited to 'global-config.changes') diff --git a/global-config.changes b/global-config.changes index e317b02..04f88e7 100644 --- a/global-config.changes +++ b/global-config.changes @@ -89,6 +89,7 @@ 78="New documentation is online for notifications via Telegram & Matrix, variable inspection, ip address calculation and running scripts once."; 79="Introduced new script 'backup-partition' to save configuration to fallback partition."; 80="The 'routeros-v7' branch will now freeze, and vanish any time in future. You already switched to 'main' branch, well done!"; + 81="Dropped script 'rotate-ntp', as the limitation does no longer exist."; }; # Migration steps to be applied on script updates @@ -101,4 +102,5 @@ 66=":global ScriptInstallUpdate; :if ([ :len [ /system/script/find where name=\"bridge-port-to-default\" ] ] > 0) do={ /system/script/remove [ find where name~\"^bridge-port-to(-default|ggle)\\\$\" ]; \$ScriptInstallUpdate mod/bridge-port-to; }"; 67=":global ScriptInstallUpdate; :global CharacterReplace; :foreach Script in=[ /system/script/find where name~\"^global-functions.d/\" ] do={ /system/script/set name=[ \$CharacterReplace [ /system/script/get \$Script name ] \"global-functions.d/\" \"mod/\" ] \$Script; }; \$ScriptInstallUpdate;"; 73=":global ScriptInstallUpdate; :global CharacterReplace; :foreach Old,New in={ \"cloud-backup\"=\"backup-cloud\"; \"email-backup\"=\"backup-email\"; \"upload-backup\"=\"backup-upload\" } do={ /system/script/set name=\$New [ find where name=\$Old ]; :foreach Scheduler in=[ /system/scheduler/find where on-event~\$Old ] do={ /system/scheduler/set \$Scheduler name=[ \$CharacterReplace [ get \$Scheduler name ] \$Old \$New ] on-event=[ \$CharacterReplace [ get \$Scheduler on-event ] \$Old \$New ]; }; }; \$ScriptInstallUpdate;"; + 81=":global NtpPool; :if ([ :len [ /system/script/find where name=\"rotate-ntp\" ] ] > 0) do={ /system/script/remove [ find where name=\"rotate-ntp\" ]; /system/scheduler/remove [ find where name=\"rotate-ntp\" ]; /system/ntp/client/set servers=\$NtpPool; };"; }; -- cgit v1.2.3-54-g00ecf