From 01fe371a0de982963ffeda0da852697726cd336e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 3 Jul 2020 08:08:04 +0200 Subject: dhcp-to-dns: allow to configure 'dhcp' prefix in zone --- dhcp-to-dns | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'dhcp-to-dns') 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 "; -- cgit v1.2.3-70-g09d2