aboutsummaryrefslogtreecommitdiffstats
path: root/dhcp-to-dns
diff options
context:
space:
mode:
Diffstat (limited to 'dhcp-to-dns')
-rw-r--r--dhcp-to-dns10
1 files changed, 6 insertions, 4 deletions
diff --git a/dhcp-to-dns b/dhcp-to-dns
index 0a7c1af..4496854 100644
--- a/dhcp-to-dns
+++ b/dhcp-to-dns
@@ -9,15 +9,17 @@
:global Domain;
:global HostNameInZone;
:global Identity;
+:global PrefixInZone;
:global CharacterReplace;
:global LogPrintExit;
-:local Zone;
+:local Zone $Domain;
:if ($HostNameInZone = true) do={
- :set Zone ("dhcp." . $Identity . "." . $Domain);
-} else={
- :set Zone ("dhcp." . $Domain);
+ :set Zone ($Identity . "." . $Zone);
+}
+:if ($PrefixInZone = true) do={
+ :set Zone ("dhcp." . $Zone);
}
:local Ttl 5m;
:local CommentPrefix "managed by dhcp-to-dns for ";