From f3876b0637140db2e242cddb5b38b128bcaa7473 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 12 Apr 2023 23:09:58 +0200 Subject: dhcp-to-dns: handle dns record by comment and type --- dhcp-to-dns.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dhcp-to-dns.rsc') diff --git a/dhcp-to-dns.rsc b/dhcp-to-dns.rsc index 67ecacd..507bda6 100644 --- a/dhcp-to-dns.rsc +++ b/dhcp-to-dns.rsc @@ -67,7 +67,7 @@ $ScriptLock $0 false 10; :local HostName [ $CharacterReplace [ $EitherOr ([ $ParseKeyValueStore ($LeaseVal->"comment") ]->"hostname") ($LeaseVal->"host-name") ] " " "" ]; :local Domain ([ $IfThenElse ($ServerNameInZone = true) ($LeaseVal->"server" . ".") ] . $Zone); - :local DnsRecord [ /ip/dns/static/find where name=($MacDash . "." . $Domain) ]; + :local DnsRecord [ /ip/dns/static/find where comment=$Comment (!type or type=A) ]; :if ([ :len $DnsRecord ] > 0) do={ :local DnsIp [ /ip/dns/static/get $DnsRecord address ]; -- cgit v1.2.3-54-g00ecf