mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-04-16 18:19:36 +00:00
dhcp-to-dns: use another :continue in loop
This commit is contained in:
parent
9b22f71492
commit
3bb767807b
1 changed files with 5 additions and 4 deletions
|
|
@ -67,7 +67,11 @@
|
|||
: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 MacDash [ $CleanName ($LeaseVal->"active-mac-address") ];
|
||||
: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={
|
||||
$LogPrintOnce warning $ScriptName ("The name '" . $FullA . "' appeared in more than one A record!");
|
||||
}
|
||||
} else={
|
||||
$LogPrint debug $ScriptName ("No address available... Ignoring.");
|
||||
}
|
||||
}
|
||||
} do={
|
||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue