dhcp-to-dns: use another :continue in loop

This commit is contained in:
Christian Hesse 2026-03-16 11:14:17 +01:00
parent ed5092b0c7
commit b0ad0c3dbd

View file

@ -67,7 +67,11 @@
:continue; :continue;
} }
:if ([ :len ($LeaseVal->"active-address") ] > 0) do={ :if ([ :len ($LeaseVal->"active-address") ] = 0) do={
$LogPrint debug $ScriptName ("No address available... Ignoring.");
:continue;
}
:local Comment ($CommentPrefix . ", macaddress=" . $LeaseVal->"active-mac-address" . ", server=" . $LeaseVal->"server"); :local Comment ($CommentPrefix . ", macaddress=" . $LeaseVal->"active-mac-address" . ", server=" . $LeaseVal->"server");
:local MacDash [ $CleanName ($LeaseVal->"active-mac-address") ]; :local MacDash [ $CleanName ($LeaseVal->"active-mac-address") ];
:local HostName [ $CleanName [ $EitherOr ([ $ParseKeyValueStore ($LeaseVal->"comment") ]->"hostname") ($LeaseVal->"host-name") ] ]; :local HostName [ $CleanName [ $EitherOr ([ $ParseKeyValueStore ($LeaseVal->"comment") ]->"hostname") ($LeaseVal->"host-name") ] ];
@ -119,9 +123,6 @@
:if ([ :len [ /ip/dns/static/find where name=$FullA type=A ] ] > 1) do={ :if ([ :len [ /ip/dns/static/find where name=$FullA type=A ] ] > 1) do={
$LogPrintOnce warning $ScriptName ("The name '" . $FullA . "' appeared in more than one A record!"); $LogPrintOnce warning $ScriptName ("The name '" . $FullA . "' appeared in more than one A record!");
} }
} else={
$LogPrint debug $ScriptName ("No address available... Ignoring.");
}
} }
} do={ } do={
:global ExitOnError; $ExitOnError [ :jobname ] $Err; :global ExitOnError; $ExitOnError [ :jobname ] $Err;