aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-04-26 16:33:41 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-04-26 16:33:41 +0200
commit625d1dda120cda02977b9f306c108755336ab4ec (patch)
treeda48ba168a10de6a892843645adf6a5d910f4b28
parent7fee37f57e92065acb6032ecc11396e020ce4bc8 (diff)
check-routeros-update: silence check-for-updates, but be more verbose
-rw-r--r--check-routeros-update7
1 files changed, 6 insertions, 1 deletions
diff --git a/check-routeros-update b/check-routeros-update
index 9dcef1d..27e346a 100644
--- a/check-routeros-update
+++ b/check-routeros-update
@@ -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");