mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-15 12:34:29 +02:00
global-functions: set $0 with script name
Now that we have some active code at the bottom...
This commit is contained in:
parent
a36aa441ed
commit
9bc2123ee5
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;
|
||||||
|
|
||||||
|
@ -1269,8 +1271,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for required RouterOS version
|
# check for required RouterOS version
|
||||||
:if ([ $RequiredRouterOS "global-functions" "7.0" false ] = true) do={
|
:if ([ $RequiredRouterOS $0 "7.0" false ] = true) do={
|
||||||
$RequiredRouterOS "global-functions" "7.1" true;
|
$RequiredRouterOS $0 "7.1" true;
|
||||||
} else={
|
} else={
|
||||||
$LogPrintExit2 warning $0 ("Still running RouterOS v6, please switch to branch " . \
|
$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;
|
"'routeros-v6', see https://git.eworm.de/cgit/routeros-scripts/about/#changes-for-routeros-v6") false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue