diff options
author | Christian Hesse <mail@eworm.de> | 2022-04-26 14:19:50 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-04-28 10:38:29 +0200 |
commit | 7a714ad182baf8e757b908d6298d6eec085029ab (patch) | |
tree | b2ff7551e1680bfc9daa30bcd6d0532e2b5f3a72 /hotspot-to-wpa | |
parent | e7481f3ca8db9a879a445db4b7f86f8e8f5b97e7 (diff) |
hotspot-to-wpa: move code for marker up
(cherry picked from commit c132d2840843a5da40f30e5b66cb1495f5c02357)
Diffstat (limited to 'hotspot-to-wpa')
-rw-r--r-- | hotspot-to-wpa | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/hotspot-to-wpa b/hotspot-to-wpa index a08e3bc..9ffee91 100644 --- a/hotspot-to-wpa +++ b/hotspot-to-wpa @@ -20,12 +20,6 @@ :local 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 ]; -:local Template [ / caps-man access-list get ([ find where disabled \ - comment=("hotspot-to-wpa template " . $Hotspot) ]->0) ]; - -:if ($Template->"action" = "reject") do={ - $LogPrintExit2 info $0 ("Ignoring login for hotspot '" . $Hotspot . "'.") true; -} :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; @@ -33,6 +27,13 @@ } :local PlaceBefore ([ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ]->0); +:local Template [ / caps-man access-list get ([ find where disabled \ + comment=("hotspot-to-wpa template " . $Hotspot) ]->0) ]; + +:if ($Template->"action" = "reject") do={ + $LogPrintExit2 info $0 ("Ignoring login for hotspot '" . $Hotspot . "'.") true; +} + # allow login page to load :delay 1s; |