Merge branch 'fixups' of github.com:gmkurtzer/warewulf into main
This commit is contained in:
5
Makefile
5
Makefile
@@ -59,8 +59,6 @@ files: all
|
||||
install -d -m 0755 $(DESTDIR)/var/lib/tftpboot/warewulf/ipxe/
|
||||
install -d -m 0755 $(DESTDIR)/etc/bash_completion.d/
|
||||
install -d -m 0755 $(DESTDIR)/usr/share/man/man1
|
||||
./bash_completion $(DESTDIR)/etc/bash_completion.d/warewulf
|
||||
./man_page $(DESTDIR)/usr/share/man/man1
|
||||
gzip $(DESTDIR)/usr/share/man/man1/wwctl*1
|
||||
test -f $(DESTDIR)/etc/warewulf/warewulf.conf || install -m 644 etc/warewulf.conf $(DESTDIR)/etc/warewulf/
|
||||
test -f $(DESTDIR)/etc/warewulf/hosts.tmpl || install -m 644 etc/hosts.tmpl $(DESTDIR)/etc/warewulf/
|
||||
@@ -78,6 +76,9 @@ files: all
|
||||
mkdir -p $(DESTDIR)/usr/lib/systemd/system
|
||||
install -c -m 0644 include/systemd/warewulfd.service $(DESTDIR)/usr/lib/systemd/system
|
||||
systemctl daemon-reload
|
||||
./bash_completion $(DESTDIR)/etc/bash_completion.d/warewulf
|
||||
./man_page $(DESTDIR)/usr/share/man/man1
|
||||
|
||||
# cp -r tftpboot/* /var/lib/tftpboot/warewulf/ipxe/
|
||||
# restorecon -r /var/lib/tftpboot/warewulf
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ package overlay
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strconv"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
@@ -33,9 +33,9 @@ type TemplateStruct struct {
|
||||
IpmiUserName string
|
||||
IpmiPassword string
|
||||
IpmiInterface string
|
||||
NetDevs map[string]*node.NetDevs
|
||||
Keys map[string]string
|
||||
AllNodes []node.NodeInfo
|
||||
NetDevs map[string]*node.NetDevs
|
||||
Keys map[string]string
|
||||
AllNodes []node.NodeInfo
|
||||
}
|
||||
|
||||
func BuildSystemOverlay(nodeList []node.NodeInfo) error {
|
||||
@@ -164,12 +164,12 @@ func buildOverlay(nodeList []node.NodeInfo, overlayType string) error {
|
||||
t.NetDevs[devname].Gateway = netdev.Gateway.Get()
|
||||
t.NetDevs[devname].Type = netdev.Type.Get()
|
||||
t.NetDevs[devname].Default = netdev.Default.GetB()
|
||||
mask := net.IPMask(net.ParseIP(netdev.Netmask.Get()).To4())
|
||||
ipaddr := net.ParseIP(netdev.Ipaddr.Get()).To4()
|
||||
netaddr := net.IPNet{IP: ipaddr,Mask: mask}
|
||||
netPrefix, _ := net.IPMask(net.ParseIP(netdev.Netmask.Get()).To4()).Size()
|
||||
t.NetDevs[devname].Prefix = strconv.Itoa(netPrefix)
|
||||
t.NetDevs[devname].IpCIDR = netaddr.String()
|
||||
mask := net.IPMask(net.ParseIP(netdev.Netmask.Get()).To4())
|
||||
ipaddr := net.ParseIP(netdev.Ipaddr.Get()).To4()
|
||||
netaddr := net.IPNet{IP: ipaddr, Mask: mask}
|
||||
netPrefix, _ := net.IPMask(net.ParseIP(netdev.Netmask.Get()).To4()).Size()
|
||||
t.NetDevs[devname].Prefix = strconv.Itoa(netPrefix)
|
||||
t.NetDevs[devname].IpCIDR = netaddr.String()
|
||||
|
||||
}
|
||||
for keyname, key := range n.Keys {
|
||||
|
||||
Reference in New Issue
Block a user