Remove ipxe binaries and configure for Rocky Linux

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2023-12-09 01:29:48 -07:00
parent 7e1cb014c2
commit 038329ebce
14 changed files with 86 additions and 73 deletions

View File

@@ -7,6 +7,5 @@ type TFTPConf struct {
TftpRoot string `yaml:"tftproot" default:"/var/lib/tftpboot"`
SystemdName string `yaml:"systemd name" default:"tftp"`
// Path is relative to buildconfig.DATADIR()
IpxeBinaries map[string]string `yaml:"ipxe" default:"{\"00:09\": \"ipxe/ipxe-snponly-x86_64.efi\",\"00:00\": \"ipxe/undionly.kpxe\",\"00:0B\": \"ipxe/arm64-efi/snponly.efi\",\"00:07\": \"ipxe/ipxe-snponly-x86_64.efi\"}"`
}

View File

@@ -23,11 +23,14 @@ func TFTP() error {
fmt.Printf("Writing PXE files to: %s\n", tftpdir)
copyCheck := make(map[string]bool)
for _, f := range controller.TFTP.IpxeBinaries {
if !path.IsAbs(f) {
f = path.Join(controller.Paths.Ipxesource, f)
}
if copyCheck[f] {
continue
}
copyCheck[f] = true
err = util.SafeCopyFile(path.Join(controller.Paths.Ipxesource, f), path.Join(tftpdir, path.Base(f)))
err = util.SafeCopyFile(f, path.Join(tftpdir, path.Base(f)))
if err != nil {
wwlog.Warn("ipxe binary could not be copied, booting may not work: %s", err)
}