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