aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-12-20 15:31:34 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-12-20 15:31:34 +0100
commit500d0679ed5989ae0bb6fbd71ebf7e9e7b1ef86e (patch)
tree7d9c7837a0f42581a9207f54fa34345d225f68ee /global-functions
parentee57ddf595851d0068730bea2ef1b55752b6d7bc (diff)
global-functions: $RequiredRouterOS: fix warning
Passing a boolean does not work... Handle as string.
Diffstat (limited to 'global-functions')
-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;
}