More updates/fixes from testing

This commit is contained in:
Gregory Kurtzer
2021-12-29 17:30:01 -08:00
parent 9f53bca1bf
commit dff5567b11
3 changed files with 4 additions and 18 deletions

View File

@@ -74,7 +74,7 @@ func BuildAllOverlays(nodes []node.NodeInfo) error {
for _, n := range nodes {
var overlays []string
overlays = append(overlays, "wwinit")
overlays = append(overlays, n.SystemOverlay.Get())
overlays = append(overlays, n.RuntimeOverlay.Get())
for _, overlay := range overlays {
@@ -194,6 +194,7 @@ func BuildOverlay(nodeInfo node.NodeInfo, overlayName string) error {
tstruct.NetDevs[devname].Gateway = netdev.Gateway.Get()
tstruct.NetDevs[devname].Type = netdev.Type.Get()
tstruct.NetDevs[devname].OnBoot = netdev.OnBoot.GetB()
tstruct.NetDevs[devname].Default = netdev.Default.GetB()
mask := net.IPMask(net.ParseIP(netdev.Netmask.Get()).To4())
ipaddr := net.ParseIP(netdev.Ipaddr.Get()).To4()

View File

@@ -1,14 +1 @@
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
{{range $node := $.AllNodes}}
# Entry for {{$node.Id.Get}}
{{- range $devname, $netdev := $node.NetDevs}}
{{- if eq $netdev.Name.Get "default"}}
{{$netdev.Ipaddr.Get}} {{$node.Id.Get}}
{{- else}}
{{$netdev.Ipaddr.Get}} {{$node.Id.Get}}-{{$devname}}
{{- end}}
{{- end}}
{{end}}
{{Include "/etc/hosts"}}

View File

@@ -1,11 +1,9 @@
# /etc/systemd/network/10-persistent-net.link
{{range $devname, $netdev := .NetDevs}}
{{- if eq $netdev.Name "default"}}
{{- if $netdev.Default}}
[Match]
MACAddress={{$netdev.Hwaddr}}
[Link]
Name={{$devname}}
{{- end}}
{{end}}