1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Set hostname prior to running DHCP

https://github.com/rancher/os/issues/627
This commit is contained in:
Darren Shepherd
2015-11-04 16:06:17 -07:00
parent 60ef1d4a60
commit ea50b5968a
2 changed files with 17 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import (
log "github.com/Sirupsen/logrus"
"github.com/rancher/netconf"
"github.com/rancher/os/cmd/cloudinit"
"github.com/rancher/os/config"
)
@@ -20,6 +21,8 @@ func Main() {
if err != nil {
log.Fatal(err)
}
// Purposely ignore error
cloudinit.SetHostname(cfg)
if err := netconf.ApplyNetworkConfigs(&cfg.Rancher.Network); err != nil {
log.Fatal(err)
}