The Version (e,g, 4.4 ), Release (git hash) and Confversion (e.g. 44) must be compiled into the code so that they can't be changed during run time and ensure this with the compiler Signed-off-by: Christian Goll <cgoll@suse.com>
45 lines
1.7 KiB
Go
45 lines
1.7 KiB
Go
package config
|
|
|
|
var ConfigFile = "@SYSCONFDIR@/warewulf/warewulf.conf"
|
|
|
|
type BuildConfig struct {
|
|
Bindir string `default:"@BINDIR@"`
|
|
Sysconfdir string `default:"@SYSCONFDIR@"`
|
|
Localstatedir string `default:"@LOCALSTATEDIR@"`
|
|
Ipxesource string `default:"@IPXESOURCE@"`
|
|
Srvdir string `default:"@SRVDIR@"`
|
|
Firewallddir string `default:"@FIREWALLDDIR@"`
|
|
Systemddir string `default:"@SYSTEMDDIR@"`
|
|
WWOverlaydir string `default:"@WWOVERLAYDIR@"`
|
|
WWChrootdir string `default:"@WWCHROOTDIR@"`
|
|
WWProvisiondir string `default:"@WWPROVISIONDIR@"`
|
|
WWClientdir string `default:"@WWCLIENTDIR@"`
|
|
}
|
|
|
|
const Version = "@VERSION@"
|
|
const Release = "@RELEASE@"
|
|
|
|
// must be set .in file so that its available for tests
|
|
const Confversion = "45"
|
|
|
|
type TFTPConf struct {
|
|
Enabled bool `yaml:"enabled" default:"true"`
|
|
TftpRoot string `yaml:"tftproot" default:"@TFTPDIR@"`
|
|
SystemdName string `yaml:"systemd name" default:"tftp"`
|
|
|
|
IpxeBinaries map[string]string `yaml:"ipxe" default:"{\"00:09\": \"ipxe-snponly-x86_64.efi\",\"00:00\": \"undionly.kpxe\",\"00:0B\": \"arm64-efi/snponly.efi\",\"00:07\": \"ipxe-snponly-x86_64.efi\"}"`
|
|
}
|
|
|
|
// WarewulfConf adds additional Warewulf-specific configuration to
|
|
// BaseConf.
|
|
type WarewulfConf struct {
|
|
Port int `yaml:"port" default:"9983"`
|
|
Secure bool `yaml:"secure" default:"true"`
|
|
UpdateInterval int `yaml:"update interval" default:"60"`
|
|
AutobuildOverlays bool `yaml:"autobuild overlays" default:"true"`
|
|
EnableHostOverlay bool `yaml:"host overlay" default:"true"`
|
|
Syslog bool `yaml:"syslog" default:"false"`
|
|
DataStore string `yaml:"datastore" default:"@DATADIR@"`
|
|
GrubBoot bool `yaml:"grubboot" default:"false"`
|
|
}
|