From 006e054517954b4bf97f11f9d9a5061bf32d3a3e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 28 Apr 2022 10:11:00 +0200 Subject: global-functions: set $0 with script name Now that we have some active code at the bottom... (cherry picked from commit 9bc2123ee5bd7af4a8e1ca47696a3f3379d5a028) --- global-functions | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 65646ad..a86c1ea 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; @@ -1273,10 +1275,10 @@ } # check for required RouterOS version -$RequiredRouterOS "global-functions" "6.47" true; +$RequiredRouterOS $0 "6.47" true; # ... 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; } -- cgit v1.2.3-70-g09d2