1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 23:04:41 +00:00

Add dhcp timeout parameter

This commit is contained in:
Jason-ZW
2018-10-22 10:11:12 +08:00
committed by niusmallnan
parent a088811de9
commit ef663b4e70
7 changed files with 31 additions and 7 deletions

View File

@@ -42,6 +42,9 @@ func ApplyNetworkConfig(cfg *config.CloudConfig) {
}
userSetHostname := cfg.Hostname != ""
if cfg.Rancher.Network.DHCPTimeout <= 0 {
cfg.Rancher.Network.DHCPTimeout = cfg.Rancher.Defaults.Network.DHCPTimeout
}
dhcpSetDNS, err := netconf.ApplyNetworkConfigs(&cfg.Rancher.Network, userSetHostname, userSetDNS)
if err != nil {
log.Errorf("Failed to apply network configs(by netconf): %v", err)