aboutsummaryrefslogtreecommitdiffstats
path: root/hotspot-to-wpa.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'hotspot-to-wpa.rsc')
-rw-r--r--hotspot-to-wpa.rsc5
1 files changed, 5 insertions, 0 deletions
diff --git a/hotspot-to-wpa.rsc b/hotspot-to-wpa.rsc
index dbce9ff..e2de112 100644
--- a/hotspot-to-wpa.rsc
+++ b/hotspot-to-wpa.rsc
@@ -16,6 +16,11 @@
:local MacAddress $"mac-address";
:local UserName $username;
+
+:if ([ :typeof $MacAddress ] = "nothing" || [ :typeof $UserName ] = "nothing") do={
+ $LogPrintExit2 error $0 ("This script is supposed to run from hotspot on login.") true;
+}
+
:local Date [ /system/clock/get date ];
:local UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ];
:local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ];