check-lte-firmware-upgrade: fail on empty version string

This commit is contained in:
Christian Hesse 2024-01-05 17:05:34 +01:00
parent 9a73fc526f
commit 0760ea9121

View file

@ -45,6 +45,11 @@ $ScriptLock $0;
:return false; :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 (($Firmware->"installed") = ($Firmware->"latest")) do={
:if ([ $ScriptFromTerminal $0 ] = true) do={ :if ([ $ScriptFromTerminal $0 ] = true) do={
$LogPrintExit2 info $0 ("No firmware upgrade available for LTE interface " . $IntName . ".") false; $LogPrintExit2 info $0 ("No firmware upgrade available for LTE interface " . $IntName . ".") false;