aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-01-05 17:05:34 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-01-05 17:05:34 +0100
commit0760ea91211b59ba20ddb08a2372d851e11a409f (patch)
treea200e6aafdc5b13d32adb9e035f2e08d6c9ade1e
parent9a73fc526f1c5cbece6790f2d11049a2667856ef (diff)
check-lte-firmware-upgrade: fail on empty version string
-rw-r--r--check-lte-firmware-upgrade.rsc5
1 files changed, 5 insertions, 0 deletions
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;