From 8418d58ff0703d18db0e513bd71484dc93c9e821 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 6 May 2025 11:15:15 +0200 Subject: [PATCH] daily-psk: fail if global functions do not become ready --- daily-psk.capsman.rsc | 6 +++--- daily-psk.local.rsc | 6 +++--- daily-psk.template.rsc | 6 +++--- daily-psk.wifi.rsc | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/daily-psk.capsman.rsc b/daily-psk.capsman.rsc index e4e7b8b..a1b01fc 100644 --- a/daily-psk.capsman.rsc +++ b/daily-psk.capsman.rsc @@ -11,11 +11,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 DailyPskMatchComment; diff --git a/daily-psk.local.rsc b/daily-psk.local.rsc index efea9b5..6ba6ce2 100644 --- a/daily-psk.local.rsc +++ b/daily-psk.local.rsc @@ -11,11 +11,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 DailyPskMatchComment; diff --git a/daily-psk.template.rsc b/daily-psk.template.rsc index 5944c74..43ce333 100644 --- a/daily-psk.template.rsc +++ b/daily-psk.template.rsc @@ -12,11 +12,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 DailyPskMatchComment; diff --git a/daily-psk.wifi.rsc b/daily-psk.wifi.rsc index 050e9c2..7e1714d 100644 --- a/daily-psk.wifi.rsc +++ b/daily-psk.wifi.rsc @@ -11,11 +11,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 DailyPskMatchComment;