check-routeros-update: silence check-for-updates, but be more verbose

This commit is contained in:
Christian Hesse 2021-04-26 16:33:41 +02:00
parent 7fee37f57e
commit 625d1dda12

View file

@ -46,13 +46,18 @@ $WaitFullyConnected;
:error "A reboot for update is already scheduled.";
}
/ system package update check-for-updates without-paging;
$LogPrintExit2 debug $0 ("Checking for updates...") false;
/ system package update check-for-updates without-paging as-value;
:local Update [ / system package update get ];
:if ([ :len ($Update->"latest-version") ] = 0) do={
$LogPrintExit2 info $0 ("An empty string is not a valid version.") true;
}
:if (($Update->"installed-version") = ($Update->"latest-version")) do={
$LogPrintExit2 info $0 ("System is already up to date.") true;
}
:local NumInstalled [ $VersionToNum ($Update->"installed-version") ];
:local NumLatest [ $VersionToNum ($Update->"latest-version") ];
:local Link ("https://mikrotik.com/download/changelogs/" . $Update->"channel" . "-release-tree");