Extend and optimize relocatable build config infrastructure

This commit is contained in:
Gregory Kurtzer
2022-01-15 03:32:32 +00:00
parent be41b79261
commit 8da7dd415a
23 changed files with 258 additions and 348 deletions

View File

@@ -3,14 +3,23 @@ package node
import (
"errors"
"io/ioutil"
"path"
"sort"
"strings"
"github.com/hpcng/warewulf/internal/pkg/buildconfig"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
"gopkg.in/yaml.v2"
)
var ConfigFile = "/etc/warewulf/nodes.conf"
var ConfigFile string
func init() {
if ConfigFile == "" {
ConfigFile = path.Join(buildconfig.SYSCONFDIR, "warewulf/nodes.conf")
}
}
func New() (nodeYaml, error) {
var ret nodeYaml