mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
dhcp-to-dns: do not update records based on host name
This commit is contained in:
@ -74,13 +74,6 @@ $ScriptLock $0 false 10;
|
||||
:set ($LeaseVal->"address") [ /ip/dhcp-server/lease/get ($DupMacLeases->([ :len $DupMacLeases ] - 1)) address ];
|
||||
}
|
||||
|
||||
:if ([ :len ($LeaseVal->"host-name") ] > 0) do={
|
||||
:local HostNameLeases [ /ip/dhcp-server/lease/find where host-name=($LeaseVal->"host-name") status=bound ];
|
||||
:if ([ :len $HostNameLeases ] > 1) do={
|
||||
:set ($LeaseVal->"address") [ /ip/dhcp-server/lease/get ($HostNameLeases->0) address ];
|
||||
}
|
||||
}
|
||||
|
||||
:if ($DnsIp = $LeaseVal->"address") do={
|
||||
$LogPrintExit2 debug $0 ("DNS entry for " . ($MacDash . "." . $Domain) . " does not need updating.") false;
|
||||
} else={
|
||||
|
Reference in New Issue
Block a user