diff options
Diffstat (limited to 'collect-wireless-mac.capsman.rsc')
-rw-r--r-- | collect-wireless-mac.capsman.rsc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/collect-wireless-mac.capsman.rsc b/collect-wireless-mac.capsman.rsc index f21fc46..f421a53 100644 --- a/collect-wireless-mac.capsman.rsc +++ b/collect-wireless-mac.capsman.rsc @@ -18,6 +18,7 @@ :global EitherOr; :global FormatLine; +:global FormatMultiLines; :global GetMacVendor; :global LogPrintExit2; :global ScriptLock; @@ -58,7 +59,10 @@ $ScriptLock $0 false 10; :set DnsName "no dns name"; :local DnsRec ([ /ip/dns/static/find where address=$Address ]->0); :if ([ :len $DnsRec ] > 0) do={ - :set DnsName [ /ip/dns/static/get $DnsRec name ]; + :set DnsName ({ [ /ip/dns/static/get $DnsRec name ] }); + :foreach CName in=[ /ip/dns/static/find where cname=($DnsName->0) ] do={ + :set DnsName ($DnsName, [ /ip/dns/static/get $CName name ]); + } } } :local DateTime ([ /system/clock/get date ] . " " . [ /system/clock/get time ]); @@ -77,7 +81,7 @@ $ScriptLock $0 false 10; [ $FormatLine "Vendor" $Vendor ] . "\n" . \ [ $FormatLine "Hostname" $HostName ] . "\n" . \ [ $FormatLine "Address" $Address ] . "\n" . \ - [ $FormatLine "DNS name" $DnsName ] . "\n" . \ + [ $FormatMultiLines "DNS name" $DnsName ] . "\n" . \ [ $FormatLine "Date" $DateTime ]) }); } } else={ |