diff options
author | Christian Hesse <mail@eworm.de> | 2024-02-08 20:54:02 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-02-08 20:54:02 +0100 |
commit | e83154c9c3e54d8ff4b1cb04bd288cddf1af4606 (patch) | |
tree | 3fcb051fc03f6c721ae82a5e78704afe391e271d | |
parent | 643f15a0b9d55a8d7dbce2f0cd6280cf7ecdfddb (diff) |
check-lte-firmware-upgrade: give more detailed infos on modem
-rw-r--r-- | check-lte-firmware-upgrade.rsc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/check-lte-firmware-upgrade.rsc b/check-lte-firmware-upgrade.rsc index 6a9074a..40a8568 100644 --- a/check-lte-firmware-upgrade.rsc +++ b/check-lte-firmware-upgrade.rsc @@ -29,8 +29,8 @@ $ScriptLock $0; :global Identity; :global SentLteFirmwareUpgradeNotification; - :global CharacterReplace; :global FormatLine; + :global IfThenElse; :global LogPrintExit2; :global ScriptFromTerminal; :global SendNotification2; @@ -84,7 +84,9 @@ $ScriptLock $0; subject=([ $SymbolForNotification "sparkles" ] . "LTE firmware upgrade"); \ message=("A new firmware version " . ($Firmware->"latest") . " is available for " . \ "LTE interface " . $IntName . " on " . $Identity . ".\n\n" . \ - [ $FormatLine "Interface" [ $CharacterReplace ($Info->"manufacturer" . " " . $Info->"model") ("\"") "" ] ] . "\n" . \ + [ $IfThenElse ([ :len ($Info->"manufacturer") ] > 0) ([ $FormatLine "Manufacturer" ($Info->"manufacturer") ] . "\n") ] . \ + [ $IfThenElse ([ :len ($Info->"model") ] > 0) ([ $FormatLine "Model" ($Info->"model") ] . "\n") ] . \ + [ $IfThenElse ([ :len ($Info->"revision") ] > 0) ([ $FormatLine "Revision" ($Info->"revision") ] . "\n") ] . \ "Firmware version:\n" . \ [ $FormatLine " Installed" ($Firmware->"installed") ] . "\n" . \ [ $FormatLine " Available" ($Firmware->"latest") ]); silent=true }); |