aboutsummaryrefslogtreecommitdiffstats
path: root/dhcp-to-dns.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-12-06 10:31:52 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-12-09 11:49:50 +0100
commitc8d423c7d59a9051914d5dd676bcd997d7e9854b (patch)
tree1708b108481b67add405873028ea36273315581f /dhcp-to-dns.rsc
parent87cde2cc2fe8604457f9fd4826abac1409d88a0d (diff)
dhcp-to-dns: use $ExitError to indicate unintentional error
Diffstat (limited to 'dhcp-to-dns.rsc')
-rw-r--r--dhcp-to-dns.rsc6
1 files changed, 5 insertions, 1 deletions
diff --git a/dhcp-to-dns.rsc b/dhcp-to-dns.rsc
index 9bf506f..ad55c4d 100644
--- a/dhcp-to-dns.rsc
+++ b/dhcp-to-dns.rsc
@@ -12,6 +12,7 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local ExitOK false;
:do {
:local ScriptName [ :jobname ];
@@ -27,6 +28,7 @@
:global ScriptLock;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
+ :set ExitOK true;
:error false;
}
@@ -123,4 +125,6 @@
$LogPrint debug $ScriptName ("No address available... Ignoring.");
}
}
-} on-error={ }
+} on-error={
+ :global ExitError; $ExitError $ExitOK [ :jobname ];
+}