From 4210a4909802b7c6c594b0fb1263cb4e06e62ad1 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 8 Aug 2019 20:27:11 +0200 Subject: check-routeros-update: fail on empty version string --- check-routeros-update | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'check-routeros-update') 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 ]; -- cgit v1.2.3-70-g09d2