check-lte-firmware-upgrade: early exit with :exit

This commit is contained in:
Christian Hesse 2026-01-19 15:06:43 +01:00
parent d36d5dec99
commit 4e0cdef89b

View file

@ -8,7 +8,6 @@
# check for LTE firmware upgrade, send notification # check for LTE firmware upgrade, send notification
# https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md # https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md
:local ExitOK false;
:onerror Err { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady; :global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
@ -20,8 +19,7 @@
:global ScriptLock; :global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={ :if ([ $ScriptLock $ScriptName ] = false) do={
:set ExitOK true; :exit;
:error false;
} }
:if ([ :typeof $SentLteFirmwareUpgradeNotification ] != "array") do={ :if ([ :typeof $SentLteFirmwareUpgradeNotification ] != "array") do={
@ -103,5 +101,5 @@
$CheckInterface $ScriptName $Interface; $CheckInterface $ScriptName $Interface;
} }
} do={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err; :global ExitOnError; $ExitOnError [ :jobname ] $Err;
} }