Skip to content

Commit

Permalink
Update networking setup (rancher#480)
Browse files Browse the repository at this point in the history
This will remove unnecessary AutoConnect and Favorite options as well as setup PreferredTechnologies to prefer ethernet over wifi if both are present.
  • Loading branch information
zimme authored Jun 23, 2020
1 parent 58b25b5 commit 0e7521e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/cc/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ func ApplyDNS(cfg *config.CloudConfig) error {
buf := &bytes.Buffer{}
buf.WriteString("[General]\n")
buf.WriteString("NetworkInterfaceBlacklist=veth\n")
buf.WriteString("PreferredTechnologies=ethernet,wifi\n")
if len(cfg.K3OS.DNSNameservers) > 0 {
dns := strings.Join(cfg.K3OS.DNSNameservers, ",")
buf.WriteString("FallbackNameservers=")
Expand Down Expand Up @@ -244,10 +245,6 @@ func ApplyWifi(cfg *config.CloudConfig) error {
buf.WriteString("Name=")
buf.WriteString(w.Name)
buf.WriteString("\n")
buf.WriteString("AutoConnect=true")
buf.WriteString("\n")
buf.WriteString("Favorite=true")
buf.WriteString("\n")
}

if buf.Len() > 0 {
Expand Down

0 comments on commit 0e7521e

Please sign in to comment.