From 6a9fced721e9ed54b451aeecc2e68f761663dfb6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 6 May 2025 14:08:37 +0200 Subject: [PATCH] hotspot-to-wpa: check for global config to be ready --- 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 a9a1407..8977cee 100644 --- a/hotspot-to-wpa.capsman.rsc +++ b/hotspot-to-wpa.capsman.rsc @@ -13,9 +13,9 @@ :local ExitOK false; :onerror Err { - :global GlobalFunctionsReady; - :retry { :if ($GlobalFunctionsReady != true) \ - do={ :error ("Global functions not ready."); }; } delay=500ms max=50; + :global GlobalConfigReady; :global GlobalFunctionsReady; + :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ + do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50; :local ScriptName [ :jobname ]; :global EitherOr; diff --git a/hotspot-to-wpa.template.rsc b/hotspot-to-wpa.template.rsc index 84a43bc..c5d977d 100644 --- a/hotspot-to-wpa.template.rsc +++ b/hotspot-to-wpa.template.rsc @@ -14,9 +14,9 @@ :local ExitOK false; :onerror Err { - :global GlobalFunctionsReady; - :retry { :if ($GlobalFunctionsReady != true) \ - do={ :error ("Global functions not ready."); }; } delay=500ms max=50; + :global GlobalConfigReady; :global GlobalFunctionsReady; + :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ + do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50; :local ScriptName [ :jobname ]; :global EitherOr; diff --git a/hotspot-to-wpa.wifi.rsc b/hotspot-to-wpa.wifi.rsc index 5c5afda..6a97e46 100644 --- a/hotspot-to-wpa.wifi.rsc +++ b/hotspot-to-wpa.wifi.rsc @@ -13,9 +13,9 @@ :local ExitOK false; :onerror Err { - :global GlobalFunctionsReady; - :retry { :if ($GlobalFunctionsReady != true) \ - do={ :error ("Global functions not ready."); }; } delay=500ms max=50; + :global GlobalConfigReady; :global GlobalFunctionsReady; + :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ + do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50; :local ScriptName [ :jobname ]; :global EitherOr;