mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
fix: derive wifi interface dynamically from gateway info instead of detecting at startup
Remove static wifi_interface/ethernet_interface fields from RpcContextSeed. Instead, look up the wifi interface from the DB (populated by gateway sync) and check ethernet connectivity by querying gateway entries. This ensures the wifi manager always uses the correct interface even if network devices change after boot.
This commit is contained in:
@@ -98,7 +98,7 @@ impl Public {
|
||||
port_forwards: BTreeSet::new(),
|
||||
},
|
||||
wifi: WifiInfo {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
..Default::default()
|
||||
},
|
||||
gateways: OrdMap::new(),
|
||||
@@ -378,7 +378,7 @@ pub struct ServerStatus {
|
||||
#[ts(export)]
|
||||
pub struct WifiInfo {
|
||||
pub enabled: bool,
|
||||
pub interface: Option<String>,
|
||||
pub interface: Option<GatewayId>,
|
||||
pub ssids: BTreeSet<String>,
|
||||
pub selected: Option<String>,
|
||||
#[ts(type = "string | null")]
|
||||
|
||||
Reference in New Issue
Block a user