aboutsummaryrefslogtreecommitdiffstats
path: root/check-routeros-update
diff options
context:
space:
mode:
Diffstat (limited to 'check-routeros-update')
-rw-r--r--check-routeros-update5
1 files changed, 5 insertions, 0 deletions
diff --git a/check-routeros-update b/check-routeros-update
index cc6d245..c4e620c 100644
--- a/check-routeros-update
+++ b/check-routeros-update
@@ -30,6 +30,11 @@
/ system package update check-for-updates without-paging;
:local Update [ / system package update get ];
+:if ([ :len ($Update->"latest-version") ] = 0) do={
+ :log warning "An empty string is not a valid version.";
+ :error "Warning: See log for details.";
+}
+
:if ($Update->"installed-version" != $Update->"latest-version") do={
:local BoardName [ / system resource get board-name ];
:local RouterBoard [ / system routerboard get ];