From 106fb36c8ccd578b3d3f0663062c8ed0779d993b Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Wed, 8 Apr 2015 07:38:09 -0700 Subject: [PATCH] Set hostname from DHCP (broken) This adds the proper variable we need to set the hostname from DHCP. End to end this does not work though. The hostname does not propagate outside the container. More changes need to be done for this. --- cmd/network/network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/network/network.go b/cmd/network/network.go index 8d944030..8ec161d6 100644 --- a/cmd/network/network.go +++ b/cmd/network/network.go @@ -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", "-A4H", link.Attrs().Name) + cmd := exec.Command("dhcpcd", "-A4", "-e", "force_hostname=true", link.Attrs().Name) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil {