aboutsummaryrefslogtreecommitdiffstats
path: root/ipv6-update.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'ipv6-update.rsc')
-rw-r--r--ipv6-update.rsc12
1 files changed, 6 insertions, 6 deletions
diff --git a/ipv6-update.rsc b/ipv6-update.rsc
index 94bd1bc..580a426 100644
--- a/ipv6-update.rsc
+++ b/ipv6-update.rsc
@@ -8,11 +8,11 @@
# update firewall and dns settings on IPv6 prefix change
# https://rsc.eworm.de/doc/ipv6-update.md
-:global GlobalFunctionsReady;
-:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-
:local ExitOK false;
-:do {
+:onerror Err {
+ :global GlobalConfigReady; :global GlobalFunctionsReady;
+ :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
+ do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ];
:global LogPrint;
@@ -102,6 +102,6 @@
}
}
}
-} on-error={
- :global ExitError; $ExitError $ExitOK [ :jobname ];
+} do={
+ :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}