aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-04-28 10:11:00 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-04-28 10:18:51 +0200
commit9bc2123ee5bd7af4a8e1ca47696a3f3379d5a028 (patch)
treedd9567edf9597ca95584df8e1acf2e6c6b513e4e /global-functions
parenta36aa441edc73bc1f4e45ffebcf9773f5f4dd154 (diff)
global-functions: set $0 with script name
Now that we have some active code at the bottom...
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions6
1 files changed, 4 insertions, 2 deletions
diff --git a/global-functions b/global-functions
index fcf2d46..7e359cf 100644
--- a/global-functions
+++ b/global-functions
@@ -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;