1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Use the partial cfg for the initial network

and release the network device from dhcp if we're not using it

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-03-21 10:26:52 +00:00
parent 77759afcaa
commit 59a752c306
8 changed files with 207 additions and 73 deletions

View File

@@ -11,7 +11,6 @@ import (
func Main() {
log.InitLogger()
log.Infof("Running network")
cfg := config.LoadConfig()
ApplyNetworkConfig(cfg)
@@ -20,6 +19,7 @@ func Main() {
}
func ApplyNetworkConfig(cfg *config.CloudConfig) {
log.Infof("Apply Network Config")
nameservers := cfg.Rancher.Network.DNS.Nameservers
search := cfg.Rancher.Network.DNS.Search
userSetDNS := len(nameservers) > 0 || len(search) > 0