From 9bc2123ee5bd7af4a8e1ca47696a3f3379d5a028 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... --- global-functions | 6 ++++-- 1 file 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; -- cgit v1.2.3-70-g09d2