aboutsummaryrefslogtreecommitdiffstats
path: root/collect-wireless-mac.template.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-04-24 21:54:50 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-04-24 22:26:26 +0200
commit83e57e6aabcd59b453f0e96695e7ceaf31c1ad6b (patch)
tree01f4c9ea7d3751814e808855434748b522b51ba9 /collect-wireless-mac.template.rsc
parentfb9feea5950caec1c9bd7b9a3188cc312bf61956 (diff)
parent82b5ae174ac15bb6c2b7180980da12c1908de7df (diff)
Merge branch 'FormatLine' into next
Diffstat (limited to 'collect-wireless-mac.template.rsc')
-rw-r--r--collect-wireless-mac.template.rsc19
1 files changed, 10 insertions, 9 deletions
diff --git a/collect-wireless-mac.template.rsc b/collect-wireless-mac.template.rsc
index c315385..a8983d9 100644
--- a/collect-wireless-mac.template.rsc
+++ b/collect-wireless-mac.template.rsc
@@ -18,6 +18,7 @@
:global Identity;
:global EitherOr;
+:global FormatLine;
:global GetMacVendor;
:global LogPrintExit2;
:global ScriptLock;
@@ -71,15 +72,15 @@ $ScriptLock $0 false 10;
$SendNotification2 ({ origin=$0; \
subject=([ $SymbolForNotification "mobile-phone" ] . $RegVal->"mac-address" . " connected to " . $RegVal->"ssid"); \
message=("A device with unknown MAC address connected to " . $RegVal->"ssid" . " on " . $Identity . ".\n\n" . \
- "Controller: " . $Identity . "\n" . \
- "Interface: " . $RegVal->"interface" . "\n" . \
- "SSID: " . $RegVal->"ssid" . "\n" . \
- "MAC: " . $RegVal->"mac-address" . "\n" . \
- "Vendor: " . $Vendor . "\n" . \
- "Hostname: " . $HostName . "\n" . \
- "Address: " . $Address . "\n" . \
- "DNS name: " . $DnsName . "\n" . \
- "Date: " . $DateTime) });
+ [ $FormatLine "Controller" $Identity ] . "\n" . \
+ [ $FormatLine "Interface" ($RegVal->"interface") ] . "\n" . \
+ [ $FormatLine "SSID" ($RegVal->"ssid") ] . "\n" . \
+ [ $FormatLine "MAC" ($RegVal->"mac-address") ] . "\n" . \
+ [ $FormatLine "Vendor" $Vendor ] . "\n" . \
+ [ $FormatLine "Hostname" $HostName ] . "\n" . \
+ [ $FormatLine "Address" $Address ] . "\n" . \
+ [ $FormatLine "DNS name" $DnsName ] . "\n" . \
+ [ $FormatLine "Date" $DateTime ]) });
}
} else={
$LogPrintExit2 debug $0 ("No mac address available... Ignoring.") false;