mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-31 00:04:51 +02:00
global-functions: $RequiredRouterOS: fix warning
Passing a boolean does not work... Handle as string.
This commit is contained in:
parent
ee57ddf595
commit
500d0679ed
1 changed files with 4 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue