1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

global-functions: set $0 with script name

Now that we have some active code at the bottom...
This commit is contained in:
Christian Hesse
2022-04-28 10:11:00 +02:00
parent a36aa441ed
commit 9bc2123ee5

View File

@ -7,6 +7,8 @@
# global functions
# https://git.eworm.de/cgit/routeros-scripts/about/
:local 0 "global-functions";
# expected configuration version
:global ExpectedConfigVersion 79;
@ -1269,8 +1271,8 @@
}
# check for required RouterOS version
:if ([ $RequiredRouterOS "global-functions" "7.0" false ] = true) do={
$RequiredRouterOS "global-functions" "7.1" true;
:if ([ $RequiredRouterOS $0 "7.0" false ] = true) do={
$RequiredRouterOS $0 "7.1" true;
} else={
$LogPrintExit2 warning $0 ("Still running RouterOS v6, please switch to branch " . \
"'routeros-v6', see https://git.eworm.de/cgit/routeros-scripts/about/#changes-for-routeros-v6") false;