mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-31 15:52:37 +00:00
dhcp-to-dns: set $LeaseInfo
This commit is contained in:
parent
df289640bc
commit
172298f5eb
1 changed files with 2 additions and 1 deletions
|
|
@ -66,6 +66,7 @@
|
|||
$LogPrint debug $ScriptName ("A lease just vanished, ignoring.");
|
||||
:continue;
|
||||
}
|
||||
:local LeaseInfo [ $ParseKeyValueStore ($LeaseVal->"comment") ];
|
||||
|
||||
:if ([ :len ($LeaseVal->"active-address") ] = 0) do={
|
||||
$LogPrint debug $ScriptName ("No address available... Ignoring.");
|
||||
|
|
@ -86,7 +87,7 @@
|
|||
|
||||
: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") ] ];
|
||||
:local HostName [ $CleanName [ $EitherOr ($LeaseInfo->"hostname") ($LeaseVal->"host-name") ] ];
|
||||
:local NetDomain ([ $IfThenElse ([ :len ($NetworkInfo->"name-extra") ] > 0) ($NetworkInfo->"name-extra" . ".") ] . \
|
||||
[ $EitherOr [ $EitherOr ($NetworkInfo->"domain") ($NetworkVal->"domain") ] $Domain ]);
|
||||
:local FullA [ :convert transform=lc ($MacDash . "." . $NetDomain) ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue