From 0760ea91211b59ba20ddb08a2372d851e11a409f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 5 Jan 2024 17:05:34 +0100 Subject: check-lte-firmware-upgrade: fail on empty version string --- check-lte-firmware-upgrade.rsc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/check-lte-firmware-upgrade.rsc b/check-lte-firmware-upgrade.rsc index f57f349..149c008 100644 --- a/check-lte-firmware-upgrade.rsc +++ b/check-lte-firmware-upgrade.rsc @@ -45,6 +45,11 @@ $ScriptLock $0; :return false; } + :if ([ :len ($Firmware->"latest") ] = 0) do={ + $LogPrintExit2 info $0 ("An empty string is not a valid version.") false; + :return false; + } + :if (($Firmware->"installed") = ($Firmware->"latest")) do={ :if ([ $ScriptFromTerminal $0 ] = true) do={ $LogPrintExit2 info $0 ("No firmware upgrade available for LTE interface " . $IntName . ".") false; -- cgit v1.2.3-70-g09d2