mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-23 12:24:28 +02:00
dhcp-to-dns: set the temporary variable unconditionally
This commit is contained in:
parent
91776d3388
commit
395bc8c90f
1 changed files with 1 additions and 4 deletions
|
@ -49,10 +49,7 @@
|
|||
:set ($LeaseVal->"address") [ / ip dhcp-server lease get ($DupMacLeases->([ :len $DupMacLeases ] - 1)) address ];
|
||||
}
|
||||
|
||||
:local DupHostLeases [ / ip dhcp-server lease find where host-name=($LeaseVal->"host-name") dynamic=yes ];
|
||||
:if ([ :len $DupHostLeases ] > 1) do={
|
||||
:set ($LeaseVal->"address") [ / ip dhcp-server lease get ($DupHostLeases->0) address ];
|
||||
}
|
||||
:set ($LeaseVal->"address") [ / ip dhcp-server lease get ([ find where host-name=($LeaseVal->"host-name") dynamic=yes ]->0) address ];
|
||||
|
||||
:if ($DnsIp = $LeaseVal->"address") do={
|
||||
:log debug ("DNS entry for " . $Fqdn . " does not need updating.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue