liminix/pkgs/anoia/wlan.fnl
Raito Bezarius 5590fea16e feat(ifwait): add ifbridgeable script
This enable to wait for bridgeability of a WLAN interface via
`iwinfo`.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-07 21:09:17 +02:00

8 lines
180 B
Fennel

(local { : nl80211 } (require :iwinfo))
(fn is-bridgeable [ifname]
(let [mode (nl80211.mode ifname)]
(or (= mode "Master") (= mode "Master (VLAN)"))
))
{ : is-bridgeable }