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

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

View file

@ -15,7 +15,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;
@ -100,6 +100,6 @@
:delay 2s; :delay 2s;
/caps-man/access-list/set $Entry action=accept; /caps-man/access-list/set $Entry action=accept;
} 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;
@ -120,6 +120,6 @@
:delay 2s; :delay 2s;
/caps-man/access-list/set $Entry action=accept; /caps-man/access-list/set $Entry action=accept;
/interface/wifi/access-list/set $Entry action=accept; /interface/wifi/access-list/set $Entry action=accept;
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -15,7 +15,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;
@ -97,6 +97,6 @@
:delay 2s; :delay 2s;
/interface/wifi/access-list/set $Entry action=accept; /interface/wifi/access-list/set $Entry action=accept;
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }