aboutsummaryrefslogtreecommitdiffstats
path: root/hotspot-to-wpa.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-06-23 17:33:51 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-06-28 11:04:13 +0200
commitf8a2b88692e21d46799738c13d4d12cfa95b4152 (patch)
tree326d8674c8daadfdd29f36e0110cfed58be876dd /hotspot-to-wpa.rsc
parent5ba34c819a93e27b0eb4c56e25435fe522e16ee3 (diff)
hotspot-to-wpa: support non-local userschange-102
This has some limitations, though: The password is not known and additional configuration can not be given in user's comment.
Diffstat (limited to 'hotspot-to-wpa.rsc')
-rw-r--r--hotspot-to-wpa.rsc5
1 files changed, 4 insertions, 1 deletions
diff --git a/hotspot-to-wpa.rsc b/hotspot-to-wpa.rsc
index d7aeb65..ede4daf 100644
--- a/hotspot-to-wpa.rsc
+++ b/hotspot-to-wpa.rsc
@@ -25,7 +25,10 @@ $ScriptLock $0;
}
:local Date [ /system/clock/get date ];
-:local UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ];
+:local UserVal ({});
+:if ([ :len [ /ip/hotspot/user/find where name=$UserName ] ] > 0) do={
+ :set UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ];
+}
:local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ];
:local Hotspot [ /ip/hotspot/host/get [ find where mac-address=$MacAddress authorized ] server ];