capsman-rolling-upgrade: early exit with :exit

This commit is contained in:
Christian Hesse 2026-01-19 15:03:44 +01:00
parent 478aec6a6d
commit 95620dee85
3 changed files with 6 additions and 12 deletions

View file

@ -13,7 +13,6 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local ExitOK false;
:onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
@ -24,8 +23,7 @@
:global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={
:set ExitOK true;
:error false;
:exit;
}
:local InstalledVersion [ /system/package/update/get installed-version ];
@ -54,5 +52,5 @@
}
}
} do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
}