aboutsummaryrefslogtreecommitdiffstats
path: root/hotspot-to-wpa
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-02-22 15:14:10 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-02-24 21:51:54 +0100
commitf46db918453dcb8878b9a0de6e122fb0ea2224d9 (patch)
tree31544a450651d0705ecdea0c3d35e650ef784d67 /hotspot-to-wpa
parentb0e52aa2d1baa78fc9d025c0671fea8babba0ec2 (diff)
global: give script or function name in log messages
Diffstat (limited to 'hotspot-to-wpa')
-rw-r--r--hotspot-to-wpa7
1 files changed, 4 insertions, 3 deletions
diff --git a/hotspot-to-wpa b/hotspot-to-wpa
index 09283cf..68f887f 100644
--- a/hotspot-to-wpa
+++ b/hotspot-to-wpa
@@ -6,10 +6,11 @@
# add private WPA passphrase after hotspot login
# https://git.eworm.de/cgit/routeros-scripts/about/doc/hotspot-to-wpa.md
+:local 0 "hotspot-to-wpa";
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-:global LogPrintExit;
+:global LogPrintExit2;
:local MacAddress $"mac-address";
:local UserName $username;
@@ -18,11 +19,11 @@
:if ([ :len [ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ] ] = 0) do={
/ caps-man access-list add comment="--- hotspot-to-wpa above ---" disabled=yes;
- $LogPrintExit warning "Added disabled access-list entry with comment '--- hotspot-to-wpa above ---'." false;
+ $LogPrintExit2 warning $0 ("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 ]->0);
-$LogPrintExit info ("Adding/updating accesslist entry for mac address " . $MacAddress . \
+$LogPrintExit2 info $0 ("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: " ];