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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user