firmware-upgrade-reboot: use :onerror for outer block

This commit is contained in:
Christian Hesse 2025-05-06 09:44:23 +02:00
parent 8ed83a311d
commit d99380443b

View file

@ -12,7 +12,7 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global LogPrint; :global LogPrint;
@ -55,6 +55,6 @@
$LogPrint info $ScriptName ("Firmware upgrade successful, rebooting."); $LogPrint info $ScriptName ("Firmware upgrade successful, rebooting.");
/system/reboot; /system/reboot;
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }