diff options
author | Christian Hesse <mail@eworm.de> | 2019-08-08 20:27:11 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2019-08-08 20:27:11 +0200 |
commit | 4210a4909802b7c6c594b0fb1263cb4e06e62ad1 (patch) | |
tree | 605947d7a07656f8b7ec6f101ae991943de31352 /check-routeros-update | |
parent | dcd47d8ac446c3e68e13df5db41ff7d13f05b3da (diff) |
check-routeros-update: fail on empty version string
Diffstat (limited to 'check-routeros-update')
-rw-r--r-- | check-routeros-update | 5 |
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 ]; |