From 03f075d1fc8f62b608af742992274efad36a4637 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 5 May 2025 18:01:28 +0200 Subject: [PATCH] daily-psk: fail if global functions do not become ready Co-authored-by: Ilya Kulakov --- daily-psk.capsman.rsc | 3 ++- daily-psk.local.rsc | 3 ++- daily-psk.template.rsc | 3 ++- daily-psk.wifi.rsc | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/daily-psk.capsman.rsc b/daily-psk.capsman.rsc index 56729315..980da34e 100644 --- a/daily-psk.capsman.rsc +++ b/daily-psk.capsman.rsc @@ -12,7 +12,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/daily-psk.local.rsc b/daily-psk.local.rsc index 9dea4692..c4b2631c 100644 --- a/daily-psk.local.rsc +++ b/daily-psk.local.rsc @@ -12,7 +12,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/daily-psk.template.rsc b/daily-psk.template.rsc index 8202eeba..ef61d29b 100644 --- a/daily-psk.template.rsc +++ b/daily-psk.template.rsc @@ -13,7 +13,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/daily-psk.wifi.rsc b/daily-psk.wifi.rsc index 3de3c5b6..cf06c6a8 100644 --- a/daily-psk.wifi.rsc +++ b/daily-psk.wifi.rsc @@ -12,7 +12,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 {