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
ed5092b0c7
commit
b0ad0c3dbd
1 changed files with 5 additions and 4 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue