From 76778f04319819eec8e2285f3a88703e4290cbde Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 6 May 2025 11:15:15 +0200 Subject: [PATCH] hotspot-to-wpa-cleanup: fail if global functions do not become ready --- hotspot-to-wpa-cleanup.capsman.rsc | 6 +++--- hotspot-to-wpa-cleanup.template.rsc | 6 +++--- hotspot-to-wpa-cleanup.wifi.rsc | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hotspot-to-wpa-cleanup.capsman.rsc b/hotspot-to-wpa-cleanup.capsman.rsc index 6cd1bfb..fd0e554 100644 --- a/hotspot-to-wpa-cleanup.capsman.rsc +++ b/hotspot-to-wpa-cleanup.capsman.rsc @@ -12,11 +12,11 @@ # # !! Do not edit this file, it is generated from template! -:global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } - :local ExitOK false; :onerror Err { + :global GlobalFunctionsReady; + :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error ("Global functions not ready."); }; } delay=500ms max=50; :local ScriptName [ :jobname ]; :global EitherOr; diff --git a/hotspot-to-wpa-cleanup.template.rsc b/hotspot-to-wpa-cleanup.template.rsc index 18d6bea..11f359c 100644 --- a/hotspot-to-wpa-cleanup.template.rsc +++ b/hotspot-to-wpa-cleanup.template.rsc @@ -13,11 +13,11 @@ # !! This is just a template to generate the real script! # !! Pattern '%TEMPL%' is replaced, paths are filtered. -:global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } - :local ExitOK false; :onerror Err { + :global GlobalFunctionsReady; + :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error ("Global functions not ready."); }; } delay=500ms max=50; :local ScriptName [ :jobname ]; :global EitherOr; diff --git a/hotspot-to-wpa-cleanup.wifi.rsc b/hotspot-to-wpa-cleanup.wifi.rsc index 6348f74..7f0ebae 100644 --- a/hotspot-to-wpa-cleanup.wifi.rsc +++ b/hotspot-to-wpa-cleanup.wifi.rsc @@ -12,11 +12,11 @@ # # !! Do not edit this file, it is generated from template! -:global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } - :local ExitOK false; :onerror Err { + :global GlobalFunctionsReady; + :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error ("Global functions not ready."); }; } delay=500ms max=50; :local ScriptName [ :jobname ]; :global EitherOr;