From 9ae733a1678577a96ba00a79de347a18c8cec319 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 6 May 2025 09:44:23 +0200 Subject: [PATCH] hotspot-to-wpa: use :onerror for outer block --- hotspot-to-wpa.capsman.rsc | 6 +++--- hotspot-to-wpa.template.rsc | 6 +++--- hotspot-to-wpa.wifi.rsc | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hotspot-to-wpa.capsman.rsc b/hotspot-to-wpa.capsman.rsc index 3f51475..54724cf 100644 --- a/hotspot-to-wpa.capsman.rsc +++ b/hotspot-to-wpa.capsman.rsc @@ -15,7 +15,7 @@ :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :local ExitOK false; -:do { +:onerror Err { :local ScriptName [ :jobname ]; :global EitherOr; @@ -100,6 +100,6 @@ :delay 2s; /caps-man/access-list/set $Entry action=accept; -} on-error={ - :global ExitError; $ExitError $ExitOK [ :jobname ]; +} do={ + :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; } diff --git a/hotspot-to-wpa.template.rsc b/hotspot-to-wpa.template.rsc index 068241d..6764af9 100644 --- a/hotspot-to-wpa.template.rsc +++ b/hotspot-to-wpa.template.rsc @@ -16,7 +16,7 @@ :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :local ExitOK false; -:do { +:onerror Err { :local ScriptName [ :jobname ]; :global EitherOr; @@ -120,6 +120,6 @@ :delay 2s; /caps-man/access-list/set $Entry action=accept; /interface/wifi/access-list/set $Entry action=accept; -} on-error={ - :global ExitError; $ExitError $ExitOK [ :jobname ]; +} do={ + :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; } diff --git a/hotspot-to-wpa.wifi.rsc b/hotspot-to-wpa.wifi.rsc index cc5e2fc..e74081a 100644 --- a/hotspot-to-wpa.wifi.rsc +++ b/hotspot-to-wpa.wifi.rsc @@ -15,7 +15,7 @@ :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :local ExitOK false; -:do { +:onerror Err { :local ScriptName [ :jobname ]; :global EitherOr; @@ -97,6 +97,6 @@ :delay 2s; /interface/wifi/access-list/set $Entry action=accept; -} on-error={ - :global ExitError; $ExitError $ExitOK [ :jobname ]; +} do={ + :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; }