diff options
author | Christian Hesse <mail@eworm.de> | 2019-11-12 13:02:40 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2019-11-12 13:02:40 +0100 |
commit | 395bc8c90f89d533486df8fd4867de4cbf6a3114 (patch) | |
tree | 844093281c186f424ffe47e7efd49914623aa41e /dhcp-to-dns | |
parent | 91776d3388e3b0d8082d7e5acaa18e7116080d7c (diff) |
dhcp-to-dns: set the temporary variable unconditionally
Diffstat (limited to 'dhcp-to-dns')
-rw-r--r-- | dhcp-to-dns | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/dhcp-to-dns b/dhcp-to-dns index e403881..81b2964 100644 --- a/dhcp-to-dns +++ b/dhcp-to-dns @@ -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."); |