check-routeros-update: always exit early if up to date...

... and just make the output and log dependent on terminal.
This commit is contained in:
Christian Hesse 2024-11-12 17:46:02 +01:00
parent 04172f0438
commit a545d0d39e

View file

@ -55,8 +55,10 @@
/system/package/update/check-for-updates without-paging as-value;
:local Update [ /system/package/update/get ];
:if ([ $ScriptFromTerminal $ScriptName ] = true && ($Update->"installed-version") = ($Update->"latest-version")) do={
$LogPrint info $ScriptName ("System is already up to date.");
:if (($Update->"installed-version") = ($Update->"latest-version")) do={
:if ([ $ScriptFromTerminal $ScriptName ] = true) do={
$LogPrint info $ScriptName ("System is already up to date.");
}
:error true;
}