hotspot-to-wpa-cleanup: use :onerror for outer block

This commit is contained in:
Christian Hesse 2025-05-06 09:44:23 +02:00
parent d609da0041
commit 143b8a8ddc
3 changed files with 9 additions and 9 deletions

View file

@ -16,7 +16,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 EitherOr; :global EitherOr;
@ -75,6 +75,6 @@
/ip/dhcp-server/lease/remove $Lease; /ip/dhcp-server/lease/remove $Lease;
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -17,7 +17,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 EitherOr; :global EitherOr;
@ -82,6 +82,6 @@
/ip/dhcp-server/lease/remove $Lease; /ip/dhcp-server/lease/remove $Lease;
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -16,7 +16,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 EitherOr; :global EitherOr;
@ -75,6 +75,6 @@
/ip/dhcp-server/lease/remove $Lease; /ip/dhcp-server/lease/remove $Lease;
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }