mirror of
https://github.com/henrygd/beszel.git
synced 2026-10-04 07:17:47 +02:00
wifi(linux): skip nl80211 when no wireless devices are registered
Check /sys/class/ieee80211 before opening netlink sockets. Looking up the nl80211 family while cfg80211 is not loaded makes the kernel run modprobe, which loads the module on hosts without wireless hardware, or fails again on every poll when the module is unavailable.
This commit is contained in:
@@ -6,6 +6,7 @@ snapshot keyed by interface (`s` SSID, `r` RSSI in dBm when available);
|
||||
interval only; real-time requests reuse the last snapshot.
|
||||
|
||||
- Linux: nl80211 via `github.com/mdlayher/wifi`. Docker needs `network_mode: host`.
|
||||
Skipped when `/sys/class/ieee80211` lists no wireless devices.
|
||||
- macOS: CoreWLAN via `osascript` (JXA). SSID may be redacted by privacy settings.
|
||||
- Windows: native WLAN API, keyed by adapter alias (e.g. `Wi-Fi`), falling back
|
||||
to interface GUID.
|
||||
|
||||
Reference in New Issue
Block a user