Revert some caps changes

Use in templates means these were an accidental interface change.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
This commit is contained in:
Jonathon Anderson
2023-04-14 19:40:54 -06:00
parent 82520c0de0
commit e2e3a90623
4 changed files with 9 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ type BuildConfig struct {
Datadir string `default:"@DATADIR@"`
Localstatedir string `default:"@LOCALSTATEDIR@"`
Srvdir string `default:"@SRVDIR@"`
TFTPdir string `default:"@TFTPDIR@"`
Tftpdir string `default:"@TFTPDIR@"`
Firewallddir string `default:"@FIREWALLDDIR@"`
Systemddir string `default:"@SYSTEMDDIR@"`
WWOverlaydir string `default:"@WWOVERLAYDIR@"`

View File

@@ -95,15 +95,15 @@ func (conf *RootConf) Read(confFileName string) (error) {
func (conf *RootConf) Parse(data []byte) (error) {
// ipxe binaries are merged not overwritten, store defaults separate
defIpxe := make(map[string]string)
for k, v := range conf.TFTP.IPXEBinaries {
for k, v := range conf.TFTP.IpxeBinaries {
defIpxe[k] = v
delete(conf.TFTP.IPXEBinaries, k)
delete(conf.TFTP.IpxeBinaries, k)
}
if err := yaml.Unmarshal(data, &conf); err != nil {
return err
}
if len(conf.TFTP.IPXEBinaries) == 0 {
conf.TFTP.IPXEBinaries = defIpxe
if len(conf.TFTP.IpxeBinaries) == 0 {
conf.TFTP.IpxeBinaries = defIpxe
}
return nil
}

View File

@@ -5,9 +5,9 @@ package config
// Warewulf will configure.
type TFTPConf struct {
Enabled bool `yaml:"enabled" default:"true"`
TFTPRoot string `yaml:"tftproot" default:"/var/lib/tftpboot"`
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\": \"x86_64.efi\",\"00:00\": \"x86_64.kpxe\",\"00:0B\": \"arm64.efi\",\"00:07\": \"x86_64.efi\"}"`
IpxeBinaries map[string]string `yaml:"ipxe" default:"{\"00:09\": \"x86_64.efi\",\"00:00\": \"x86_64.kpxe\",\"00:0B\": \"arm64.efi\",\"00:07\": \"x86_64.efi\"}"`
}