removed getters as configs must exportable
Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
@@ -14,13 +14,12 @@ import (
|
||||
|
||||
/*
|
||||
Reads a file file from the host fs. If the file has nor '/' prefix
|
||||
the path is relative to SYSCONFDIR.
|
||||
Templates in the file are no evaluated.
|
||||
the path is relative to Paths.SysconfdirTemplates in the file are no evaluated.
|
||||
*/
|
||||
func templateFileInclude(inc string) string {
|
||||
conf := warewulfconf.New()
|
||||
if !strings.HasPrefix(inc, "/") {
|
||||
inc = path.Join(conf.SYSCONFDIR(), "warewulf", inc)
|
||||
inc = path.Join(conf.Paths.Sysconfdir, "warewulf", inc)
|
||||
}
|
||||
wwlog.Debug("Including file into template: %s", inc)
|
||||
content, err := os.ReadFile(inc)
|
||||
@@ -38,7 +37,7 @@ Templates in the file are no evaluated.
|
||||
func templateFileBlock(inc string, abortStr string) (string, error) {
|
||||
conf := warewulfconf.New()
|
||||
if !strings.HasPrefix(inc, "/") {
|
||||
inc = path.Join(conf.SYSCONFDIR(), "warewulf", inc)
|
||||
inc = path.Join(conf.Paths.Sysconfdir, "warewulf", inc)
|
||||
}
|
||||
wwlog.Debug("Including file block into template: %s", inc)
|
||||
readFile, err := os.Open(inc)
|
||||
|
||||
Reference in New Issue
Block a user