mirror of
https://github.com/rancher/os.git
synced 2025-07-04 18:46:15 +00:00
Optimize the startup process for wifi network
This commit is contained in:
parent
cdc7906910
commit
f508c86d5a
@ -180,7 +180,17 @@ func ApplyNetworkConfigs(netCfg *NetworkConfig, userSetHostname, userSetDNS bool
|
|||||||
|
|
||||||
//apply network config
|
//apply network config
|
||||||
for _, link := range links {
|
for _, link := range links {
|
||||||
applyOuter(link, netCfg, &wg, userSetHostname, userSetDNS)
|
if !strings.Contains(link.Attrs().Name, "wlan") {
|
||||||
|
applyOuter(link, netCfg, &wg, userSetHostname, userSetDNS)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wg.Wait()
|
||||||
|
|
||||||
|
// apply wifi network config
|
||||||
|
for _, link := range links {
|
||||||
|
if strings.Contains(link.Attrs().Name, "wlan") {
|
||||||
|
applyOuter(link, netCfg, &wg, userSetHostname, userSetDNS)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
@ -337,7 +347,7 @@ func runWifiDhcp(netCfg *NetworkConfig, link netlink.Link, network string, setHo
|
|||||||
removeAddress(addr, link)
|
removeAddress(addr, link)
|
||||||
}
|
}
|
||||||
|
|
||||||
runDhcp(netCfg, iface, "", !setHostname, setDNS)
|
runDhcp(netCfg, iface, "", setHostname, setDNS)
|
||||||
}
|
}
|
||||||
|
|
||||||
func linkUp(link netlink.Link, netConf InterfaceConfig) error {
|
func linkUp(link netlink.Link, netConf InterfaceConfig) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user