From e104b54bf0b48fae9b2d5002f86bf6de39aa0770 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 5 Mar 2020 09:17:19 +0100 Subject: hotspot-to-wpa: use $LogPrintExit and add more logging --- hotspot-to-wpa | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hotspot-to-wpa b/hotspot-to-wpa index 5f21878..aa1430a 100644 --- a/hotspot-to-wpa +++ b/hotspot-to-wpa @@ -4,6 +4,8 @@ # # add private WPA passphrase after hotspot login +:global LogPrintExit; + :local MacAddress $"mac-address"; :local UserName $username; :local Date [ / system clock get date ]; @@ -11,10 +13,13 @@ :if ([ / caps-man access-list print count-only where comment="--- hotspot-to-wpa above ---" disabled ] = 0) do={ / caps-man access-list add comment="--- hotspot-to-wpa above ---" disabled; - log warn "Added disabled access-list entry with comment '--- hotspot-to-wpa above ---'."; + $LogPrintExit warning "Added disabled access-list entry with comment '--- hotspot-to-wpa above ---'." false; } :local PlaceBefore [ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ]; +$LogPrintExit info ("Adding/updating accesslist entry for mac address " . $MacAddress . \ + " (user " . $UserName . ").") false; + / caps-man access-list remove [ find where mac-address=$MacAddress comment~"^hotspot-to-wpa: " ]; :local Limits [ / caps-man access-list get $PlaceBefore ]; -- cgit v1.2.3-54-g00ecf