From f4d6e07dbb6c1406b56c77116a52d11ff8b363b1 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 14 Jul 2020 16:32:17 +0200 Subject: global-config: dropped $ScriptUpdatesIgnore, use ignore flag in comment --- global-functions | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 57ae336..db27774 100644 --- a/global-functions +++ b/global-functions @@ -8,7 +8,7 @@ # https://git.eworm.de/cgit/routeros-scripts/about/ # expected configuration version -:global ExpectedConfigVersion 21; +:global ExpectedConfigVersion 22; # global variables not to be changed by user :global GlobalFunctionsReady false; @@ -529,11 +529,19 @@ } :if ([ :len $SourceNew ] = 0 && $ScriptUpdatesFetch = true) do={ - :foreach IgnoreLoop in=$ScriptUpdatesIgnore do={ - :if ($IgnoreLoop = $ScriptVal->"name") do={ :set Ignore 1; } - } :local Comment [ $ParseKeyValueStore ($ScriptVal->"comment") ]; - :if ($Comment->"ignore" = true) do={ :set Ignore 1; } + :if ($Comment->"ignore" = true) do={ + :set Ignore 1; + } else={ + # TODO: remove at later time + :foreach IgnoreLoop in=$ScriptUpdatesIgnore do={ + :if ($IgnoreLoop = $ScriptVal->"name") do={ + :set Ignore 1; + $LogPrintExit info ("Migrating script " . $ScriptVal->"name" . " to ignore flag in comment.") false; + / system script set comment="ignore" ($ScriptVal->"name"); + } + } + } :if ($Ignore = 0) do={ $LogPrintExit debug ("Fetching script from url: " . $ScriptVal->"name") false; -- cgit v1.2.3-54-g00ecf