diff options
Diffstat (limited to 'collect-wireless-mac.local')
-rw-r--r-- | collect-wireless-mac.local | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/collect-wireless-mac.local b/collect-wireless-mac.local index 882741f..4e60159 100644 --- a/collect-wireless-mac.local +++ b/collect-wireless-mac.local @@ -24,18 +24,15 @@ $ScriptLock "collect-wireless-mac.local"; :local Mac [ / interface wireless registration-table get $RegTbl mac-address ]; :local AccessList ([ / interface wireless access-list find where mac-address=$Mac ]->0); :if ([ :len $AccessList ] = 0) do={ - :local HostName "no dhcp lease"; :local Address "no dhcp lease"; + :local HostName "no dhcp lease"; :local Lease [ / ip dhcp-server lease find where mac-address=$Mac ]; :if ([ :len $Lease ] > 0) do={ - :set HostName [ / ip dhcp-server lease get $Lease host-name ]; :set Address [ / ip dhcp-server lease get $Lease address ]; + :set HostName [ / ip dhcp-server lease get $Lease host-name ]; :if ([ :len $HostName ] = 0) do={ :set HostName "no hostname"; } - :if ([ :len $Address ] = 0) do={ - :set Address "no address"; - } } :local RegEntry [ / interface wireless registration-table find where mac-address=$Mac ]; :local Interface [ / interface wireless registration-table get $RegEntry interface ]; |