Use node.NewInfo constructor in configure hostfile

Also used in overlay, as I was looking there already.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
This commit is contained in:
Jonathon Anderson
2022-11-11 10:45:14 -06:00
parent 037c456bc4
commit 15879eb991
2 changed files with 6 additions and 8 deletions

View File

@@ -81,14 +81,11 @@ func BuildSpecificOverlays(nodes []node.NodeInfo, overlayNames []string) error {
Build overlay for the host, so no argument needs to be given
*/
func BuildHostOverlay() error {
var host node.NodeInfo
host.Kernel = new(node.KernelEntry)
host.Ipmi = new(node.IpmiEntry)
var idEntry node.Entry
host := node.NewInfo()
hostname, _ := os.Hostname()
host.Id.Set(hostname)
wwlog.Info("Building overlay for %s: host", hostname)
idEntry.Set(hostname)
host.Id = idEntry
hostdir := OverlaySourceDir("host")
stats, err := os.Stat(hostdir)
if err != nil {