1
0
mirror of https://github.com/rancher/os.git synced 2025-08-01 06:59:05 +00:00

Attempt to set hostname from DHCP

This commit is contained in:
Darren Shepherd 2015-04-07 11:41:57 -07:00
parent 252e491286
commit 43e3d380f4

View File

@ -116,7 +116,7 @@ func ApplyNetworkConfigs(netCfg *config.NetworkConfig) error {
func applyNetConf(link netlink.Link, netConf config.InterfaceConfig) error {
if netConf.DHCP {
log.Infof("Running DHCP on %s", link.Attrs().Name)
cmd := exec.Command("dhcpcd", "-A4", link.Attrs().Name)
cmd := exec.Command("dhcpcd", "-A4H", link.Attrs().Name)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {