From cc382f5481d96617e7f315787483ea4c3a604231 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 5 May 2025 18:01:28 +0200 Subject: [PATCH] accesslist-duplicates: fail if global functions do not become ready Co-authored-by: Ilya Kulakov --- accesslist-duplicates.capsman.rsc | 3 ++- accesslist-duplicates.local.rsc | 3 ++- accesslist-duplicates.template.rsc | 3 ++- accesslist-duplicates.wifi.rsc | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/accesslist-duplicates.capsman.rsc b/accesslist-duplicates.capsman.rsc index 27546c8d..00f76aa0 100644 --- a/accesslist-duplicates.capsman.rsc +++ b/accesslist-duplicates.capsman.rsc @@ -11,7 +11,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/accesslist-duplicates.local.rsc b/accesslist-duplicates.local.rsc index 589815d6..8fdeb929 100644 --- a/accesslist-duplicates.local.rsc +++ b/accesslist-duplicates.local.rsc @@ -11,7 +11,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/accesslist-duplicates.template.rsc b/accesslist-duplicates.template.rsc index ccbca3df..d07ad9bb 100644 --- a/accesslist-duplicates.template.rsc +++ b/accesslist-duplicates.template.rsc @@ -12,7 +12,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/accesslist-duplicates.wifi.rsc b/accesslist-duplicates.wifi.rsc index 527ebb4b..3c676b1d 100644 --- a/accesslist-duplicates.wifi.rsc +++ b/accesslist-duplicates.wifi.rsc @@ -11,7 +11,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 {