1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

Call dhcp release on interfaces that are dhcp:false

and then remove any non-specified IP addresses from them too

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-03-30 12:29:32 +00:00
parent d35e0e05d8
commit ac5cb304d6
3 changed files with 28 additions and 13 deletions

View File

@@ -43,10 +43,12 @@ func ApplyNetworkConfig(cfg *config.CloudConfig) {
// TODO: seems wrong to do this outside netconf
userSetHostname := cfg.Hostname != ""
log.Infof("Apply Network Config RunDhcp")
if err := netconf.RunDhcp(&cfg.Rancher.Network, !userSetHostname, !userSetDNS); err != nil {
log.Error(err)
}
log.Infof("Apply Network Config SyncHostname")
if err := hostname.SyncHostname(); err != nil {
log.Error(err)
}