From f4b0516986817cb77c87fdb8643f22649ceeb18a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 5 May 2025 18:01:28 +0200 Subject: [PATCH] hotspot-to-wpa-cleanup: fail if global functions do not become ready Co-authored-by: Ilya Kulakov --- hotspot-to-wpa-cleanup.capsman.rsc | 3 ++- hotspot-to-wpa-cleanup.template.rsc | 3 ++- hotspot-to-wpa-cleanup.wifi.rsc | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hotspot-to-wpa-cleanup.capsman.rsc b/hotspot-to-wpa-cleanup.capsman.rsc index 033d0e73..38c931db 100644 --- a/hotspot-to-wpa-cleanup.capsman.rsc +++ b/hotspot-to-wpa-cleanup.capsman.rsc @@ -13,7 +13,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/hotspot-to-wpa-cleanup.template.rsc b/hotspot-to-wpa-cleanup.template.rsc index 0f8c490e..21d1be2e 100644 --- a/hotspot-to-wpa-cleanup.template.rsc +++ b/hotspot-to-wpa-cleanup.template.rsc @@ -14,7 +14,8 @@ # !! Pattern '%TEMPL%' is replaced, paths are filtered. :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/hotspot-to-wpa-cleanup.wifi.rsc b/hotspot-to-wpa-cleanup.wifi.rsc index dfec697d..8c526d11 100644 --- a/hotspot-to-wpa-cleanup.wifi.rsc +++ b/hotspot-to-wpa-cleanup.wifi.rsc @@ -13,7 +13,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do {