mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
collect-wireless-mac: use 'active-' properties from lease
This commit is contained in:
@ -51,9 +51,9 @@ $ScriptLock $0 false 10;
|
||||
:local Address "no dhcp lease";
|
||||
:local DnsName "no dhcp lease";
|
||||
:local HostName "no dhcp lease";
|
||||
:local Lease ([ /ip/dhcp-server/lease/find where mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0);
|
||||
:local Lease ([ /ip/dhcp-server/lease/find where active-mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0);
|
||||
:if ([ :len $Lease ] > 0) do={
|
||||
:set Address [ /ip/dhcp-server/lease/get $Lease address ];
|
||||
:set Address [ /ip/dhcp-server/lease/get $Lease active-address ];
|
||||
:set HostName [ $EitherOr [ /ip/dhcp-server/lease/get $Lease host-name ] "no hostname" ];
|
||||
:set DnsName "no dns name";
|
||||
:local DnsRec ([ /ip/dns/static/find where address=$Address ]->0);
|
||||
|
@ -51,9 +51,9 @@ $ScriptLock $0 false 10;
|
||||
:local Address "no dhcp lease";
|
||||
:local DnsName "no dhcp lease";
|
||||
:local HostName "no dhcp lease";
|
||||
:local Lease ([ /ip/dhcp-server/lease/find where mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0);
|
||||
:local Lease ([ /ip/dhcp-server/lease/find where active-mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0);
|
||||
:if ([ :len $Lease ] > 0) do={
|
||||
:set Address [ /ip/dhcp-server/lease/get $Lease address ];
|
||||
:set Address [ /ip/dhcp-server/lease/get $Lease active-address ];
|
||||
:set HostName [ $EitherOr [ /ip/dhcp-server/lease/get $Lease host-name ] "no hostname" ];
|
||||
:set DnsName "no dns name";
|
||||
:local DnsRec ([ /ip/dns/static/find where address=$Address ]->0);
|
||||
|
@ -52,9 +52,9 @@ $ScriptLock $0 false 10;
|
||||
:local Address "no dhcp lease";
|
||||
:local DnsName "no dhcp lease";
|
||||
:local HostName "no dhcp lease";
|
||||
:local Lease ([ /ip/dhcp-server/lease/find where mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0);
|
||||
:local Lease ([ /ip/dhcp-server/lease/find where active-mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0);
|
||||
:if ([ :len $Lease ] > 0) do={
|
||||
:set Address [ /ip/dhcp-server/lease/get $Lease address ];
|
||||
:set Address [ /ip/dhcp-server/lease/get $Lease active-address ];
|
||||
:set HostName [ $EitherOr [ /ip/dhcp-server/lease/get $Lease host-name ] "no hostname" ];
|
||||
:set DnsName "no dns name";
|
||||
:local DnsRec ([ /ip/dns/static/find where address=$Address ]->0);
|
||||
|
Reference in New Issue
Block a user