aboutsummaryrefslogtreecommitdiffstats
path: root/dhcp-to-dns.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-04-12 23:09:58 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-04-24 22:26:26 +0200
commitf3876b0637140db2e242cddb5b38b128bcaa7473 (patch)
tree1804e58f6e789a4d549fc9632f229cf85ae240ae /dhcp-to-dns.rsc
parent83e57e6aabcd59b453f0e96695e7ceaf31c1ad6b (diff)
dhcp-to-dns: handle dns record by comment and type
Diffstat (limited to 'dhcp-to-dns.rsc')
-rw-r--r--dhcp-to-dns.rsc2
1 files changed, 1 insertions, 1 deletions
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 ];