Recommended refactors
- make sure spec sets new cache dir - move clean out of api - capture warewulfconf.Paths.Cachedir+"/warewulf" in once place - split Clean() into multiple functions - remove WriteFileAbs Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"path"
|
||||
)
|
||||
|
||||
var ConfigFile = "@SYSCONFDIR@/warewulf/warewulf.conf"
|
||||
|
||||
type BuildConfig struct {
|
||||
@@ -43,3 +47,11 @@ type WarewulfConf struct {
|
||||
DataStore string `yaml:"datastore" default:"@DATADIR@"`
|
||||
GrubBoot bool `yaml:"grubboot" default:"false"`
|
||||
}
|
||||
|
||||
func (paths BuildConfig) OciBlobCachedir() string {
|
||||
return path.Join(paths.Cachedir, "warewulf")
|
||||
}
|
||||
|
||||
func (paths BuildConfig) OverlayProvisiondir() string {
|
||||
return path.Join(paths.WWProvisiondir, "overlays")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user