diff options
author | Christian Hesse <mail@eworm.de> | 2023-03-21 22:49:33 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-03-22 10:13:24 +0100 |
commit | 682a09c94b777083e9a60c65e2f8c574850cfc20 (patch) | |
tree | f577646c3d56169f69578a0a982fb8fadfac9c1d | |
parent | 3d589def7d5a1919f41c6f6cd128ff7c383e7a3d (diff) |
dhcp-to-dns: match comment on beginning of line
-rw-r--r-- | dhcp-to-dns.rsc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcp-to-dns.rsc b/dhcp-to-dns.rsc index 6e2c2a9..0914330 100644 --- a/dhcp-to-dns.rsc +++ b/dhcp-to-dns.rsc @@ -38,7 +38,7 @@ $ScriptLock $0 false 10; } :local PlaceBefore ([ /ip/dns/static/find where (name=$CommentString or (comment=$CommentString and name=-)) type=NXDOMAIN disabled ]->0); -:foreach DnsRecord in=[ /ip/dns/static/find where comment ~ $CommentPrefix ] do={ +:foreach DnsRecord in=[ /ip/dns/static/find where comment~("^" . $CommentPrefix) ] do={ :local DnsRecordVal [ /ip/dns/static/get $DnsRecord ]; :local MacAddress [ $CharacterReplace ($DnsRecordVal->"comment") $CommentPrefix "" ]; :if ([ :len [ /ip/dhcp-server/lease/find where mac-address=$MacAddress address=($DnsRecordVal->"address") status=bound ] ] > 0) do={ |