From 83cf003f62877f34abb112ed5105b391ea11f4e6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 6 May 2025 11:15:15 +0200 Subject: [PATCH] ipsec-to-dns: fail if global functions do not become ready --- ipsec-to-dns.rsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipsec-to-dns.rsc b/ipsec-to-dns.rsc index a273932..fb7b55c 100644 --- a/ipsec-to-dns.rsc +++ b/ipsec-to-dns.rsc @@ -9,11 +9,11 @@ # and add/remove/update DNS entries from IPSec mode-config # https://rsc.eworm.de/doc/ipsec-to-dns.md -: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 Domain;