diff options
author | Christian Hesse <mail@eworm.de> | 2024-02-08 20:56:35 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-02-08 21:02:06 +0100 |
commit | 860acffbdb679a0ce378513e7b0bd9a5805accfd (patch) | |
tree | 97acbe9e8fcfc177376b93f586445099b708be22 | |
parent | e83154c9c3e54d8ff4b1cb04bd288cddf1af4606 (diff) |
unattended-lte-firmware-upgrade: add error handling
-rw-r--r-- | unattended-lte-firmware-upgrade.rsc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/unattended-lte-firmware-upgrade.rsc b/unattended-lte-firmware-upgrade.rsc index 1cbdbfb..904f952 100644 --- a/unattended-lte-firmware-upgrade.rsc +++ b/unattended-lte-firmware-upgrade.rsc @@ -24,13 +24,17 @@ :set LTEFirmwareUpgrade; /system/scheduler/remove ($1 . "-firmware-upgrade"); - /interface/lte/firmware-upgrade $1 upgrade=yes; - :log info ("LTE firmware upgrade on '" . $1 . "' finished, waiting for reset."); - :delay 240s; - :local Firmware [ /interface/lte/firmware-upgrade $1 once as-value ]; - :if (($Firmware->"installed") != ($Firmware->"latest")) do={ - :log warning ("LTE firmware versions still differ. Resetting again..."); - /interface/lte/at-chat $1 input="AT+RESET"; + :do { + /interface/lte/firmware-upgrade $1 upgrade=yes; + :log info ("LTE firmware upgrade on '" . $1 . "' finished, waiting for reset."); + :delay 240s; + :local Firmware [ /interface/lte/firmware-upgrade $1 once as-value ]; + :if (($Firmware->"installed") != ($Firmware->"latest")) do={ + :log warning ("LTE firmware versions still differ. Resetting again..."); + /interface/lte/at-chat $1 input="AT+RESET"; + } + } on-error={ + :log error ("LTE firmware upgrade on '" . $1 . "' failed."); } } |