mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-03 06:34:27 +02:00
global-functions: set $0 with script name
Now that we have some active code at the bottom...
(cherry picked from commit 9bc2123ee5
)
This commit is contained in:
parent
d9c4e1e8d5
commit
006e054517
1 changed files with 4 additions and 2 deletions
|
@ -7,6 +7,8 @@
|
||||||
# global functions
|
# global functions
|
||||||
# https://git.eworm.de/cgit/routeros-scripts/about/
|
# https://git.eworm.de/cgit/routeros-scripts/about/
|
||||||
|
|
||||||
|
:local 0 "global-functions";
|
||||||
|
|
||||||
# expected configuration version
|
# expected configuration version
|
||||||
:global ExpectedConfigVersion 79;
|
:global ExpectedConfigVersion 79;
|
||||||
|
|
||||||
|
@ -1273,10 +1275,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for required RouterOS version
|
# check for required RouterOS version
|
||||||
$RequiredRouterOS "global-functions" "6.47" true;
|
$RequiredRouterOS $0 "6.47" true;
|
||||||
|
|
||||||
# ... and give a hint on RouterOS v7.
|
# ... and give a hint on RouterOS v7.
|
||||||
:if ([ $RequiredRouterOS "global-functions" "7.0" false ] = true) do={
|
:if ([ $RequiredRouterOS $0 "7.0" false ] = true) do={
|
||||||
$LogPrintExit2 warning $0 ("RouterOS v7 brings some incompatible changes. Please switch to main branch!") false;
|
$LogPrintExit2 warning $0 ("RouterOS v7 brings some incompatible changes. Please switch to main branch!") false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue