mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-16 04:54:28 +02:00
global-config: dropped $ScriptUpdatesIgnore, use ignore flag in comment
This commit is contained in:
parent
d1b6ca3d0b
commit
f4d6e07dbb
6 changed files with 23 additions and 17 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue