aboutsummaryrefslogtreecommitdiffstats
path: root/dhcp-to-dns
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-07-03 08:08:04 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-07-03 08:20:36 +0200
commit01fe371a0de982963ffeda0da852697726cd336e (patch)
treea6a1f720b08b265dff69457a00f5eb63d1e24543 /dhcp-to-dns
parentef2cb11665cb2c855437606fe3b1a3c18310807c (diff)
dhcp-to-dns: allow to configure 'dhcp' prefix in zone
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 ";