diff options
author | Christian Hesse <mail@eworm.de> | 2020-03-05 08:22:47 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-03-05 08:22:47 +0100 |
commit | 1dbd91f76d4f5aac19fa8802f38a3d41ae0bec14 (patch) | |
tree | 2b746e0f0db1ebf5f906d4903926782862cec94c /collect-wireless-mac.capsman | |
parent | f90c59e4fb4ce7d7b71ccfd01755b7b7212fc9d1 (diff) |
collect-wireless-mac: use $LogPrintExit
Diffstat (limited to 'collect-wireless-mac.capsman')
-rw-r--r-- | collect-wireless-mac.capsman | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/collect-wireless-mac.capsman b/collect-wireless-mac.capsman index a280cea..771a332 100644 --- a/collect-wireless-mac.capsman +++ b/collect-wireless-mac.capsman @@ -9,6 +9,7 @@ :global Identity; :global GetMacVendor; +:global LogPrintExit; :global ScriptLock; :global SendNotification; @@ -16,7 +17,7 @@ $ScriptLock "collect-wireless-mac.capsman"; :if ([ / caps-man access-list print count-only where comment="--- collected above ---" disabled ] = 0) do={ / caps-man access-list add comment="--- collected above ---" disabled=yes; - :log warn "Added disabled access-list entry with comment '--- collected above ---'."; + $LogPrintExit warn "Added disabled access-list entry with comment '--- collected above ---'." false; } :local PlaceBefore [ / caps-man access-list find where comment="--- collected above ---" disabled ]; @@ -46,7 +47,7 @@ $ScriptLock "collect-wireless-mac.capsman"; :local Vendor [ $GetMacVendor $Mac ]; :local Message ("unknown MAC address " . $Mac . " (" . $Vendor . ", " . $HostName . ") " . \ "first seen on " . $DateTime . " connected to SSID " . $Ssid . ", interface " . $Interface); - / log info $Message; + $LogPrintExit info $Message false; / caps-man access-list add place-before=$PlaceBefore comment=$Message mac-address=$Mac disabled=yes; $SendNotification ($Mac . " connected to " . $Ssid) \ ("A device with unknown MAC address connected to " . $Ssid . " on " . $Identity . ".\n\n" . \ @@ -60,7 +61,7 @@ $ScriptLock "collect-wireless-mac.capsman"; "DNS name: " . $DnsName . "\n" . \ "Date: " . $DateTime); } else={ - :local Comment [ / caps-man access-list get $AccessList comment ]; - :log debug ("MAC address " . $Mac . " already known: " . $Comment); + $LogPrintExit debug ("MAC address " . $Mac . " already known: " . \ + [ / caps-man access-list get $AccessList comment ]) false; } } |