aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--global-functions9
1 files changed, 4 insertions, 5 deletions
diff --git a/global-functions b/global-functions
index 4ff2a7a..e89587f 100644
--- a/global-functions
+++ b/global-functions
@@ -632,16 +632,15 @@
# check for required RouterOS version
:set RequiredRouterOS do={
- :local Caller [ :tostr $1 ];
- :local Required [ :tostr $2 ];
- :local Warn [ :tobool $3 ];
+ :local Caller [ :tostr $1 ];
+ :local Required [ :tostr $2 ];
+ :local Warn [ :tostr $3 ];
:global IfThenElse;
:global LogPrintExit2;
:global VersionToNum;
-
:if ([ $VersionToNum $Required ] > [ $VersionToNum [ / system package update get installed-version ] ]) do={
- :if ($Warn = true) do={
+ :if ($Warn = "true") do={
$LogPrintExit2 warning $0 ("This " . [ $IfThenElse ([ :pick $Caller 0 ] = ("\$")) "function" "script" ] . \
" '" . $Caller . "' (at least specific functionality) requires RouterOS " . $Required . ". Please update!") false;
}