From 172d43288e2117f2a687df6168d2d461e780a8c3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 6 Dec 2024 10:31:51 +0100 Subject: capsman-rolling-upgrade: use $ExitError to indicate unintentional error --- capsman-rolling-upgrade.wifi.rsc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'capsman-rolling-upgrade.wifi.rsc') diff --git a/capsman-rolling-upgrade.wifi.rsc b/capsman-rolling-upgrade.wifi.rsc index 369dccc..c9e6622 100644 --- a/capsman-rolling-upgrade.wifi.rsc +++ b/capsman-rolling-upgrade.wifi.rsc @@ -15,6 +15,7 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:local ExitOK false; :do { :local ScriptName [ :jobname ]; @@ -22,6 +23,7 @@ :global ScriptLock; :if ([ $ScriptLock $ScriptName ] = false) do={ + :set ExitOK true; :error false; } @@ -44,4 +46,6 @@ :delay ($Delay . "s"); } } -} on-error={ } +} on-error={ + :global ExitError; $ExitError $ExitOK [ :jobname ]; +} -- cgit v1.2.3-70-g09d2