moved location of defaults.conf

Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
Christian Goll
2023-03-07 11:49:09 +01:00
parent c1e2100322
commit b00a619746
5 changed files with 3 additions and 13 deletions

View File

@@ -183,7 +183,7 @@ files: all
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapic.conf || install -m 644 etc/wwapic.conf $(DESTDIR)$(WWCONFIGDIR) test -f $(DESTDIR)$(WWCONFIGDIR)/wwapic.conf || install -m 644 etc/wwapic.conf $(DESTDIR)$(WWCONFIGDIR)
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapid.conf || install -m 644 etc/wwapid.conf $(DESTDIR)$(WWCONFIGDIR) test -f $(DESTDIR)$(WWCONFIGDIR)/wwapid.conf || install -m 644 etc/wwapid.conf $(DESTDIR)$(WWCONFIGDIR)
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapird.conf || install -m 644 etc/wwapird.conf $(DESTDIR)$(WWCONFIGDIR) test -f $(DESTDIR)$(WWCONFIGDIR)/wwapird.conf || install -m 644 etc/wwapird.conf $(DESTDIR)$(WWCONFIGDIR)
test -f $(DESTDIR)$(WWCONFIGDIR)/defaults.conf || ./wwctl genconfig defaults > $(DESTDIR)$(WWCONFIGDIR)/defaults.conf test -f $(DESTDIR)$(DATADIR)/warewulf/defaults.conf || ./wwctl --emptyconf genconfig defaults > $(DESTDIR)$(DATADIR)/warewulf/defaults.conf
cp -r etc/examples $(DESTDIR)$(WWCONFIGDIR)/ cp -r etc/examples $(DESTDIR)$(WWCONFIGDIR)/
cp -r etc/ipxe $(DESTDIR)$(WWCONFIGDIR)/ cp -r etc/ipxe $(DESTDIR)$(WWCONFIGDIR)/
cp -r overlays/* $(DESTDIR)$(WWOVERLAYDIR)/ cp -r overlays/* $(DESTDIR)$(WWOVERLAYDIR)/
@@ -247,7 +247,7 @@ dist: vendor config
rm -rf .dist rm -rf .dist
reference: wwctl reference: wwctl
./wwctl genconfig reference userdocs/reference/ ./wwctl --emptyconf genconfig reference userdocs/reference/
latexpdf: reference latexpdf: reference
make -C userdocs latexpdf make -C userdocs latexpdf

1
go.mod
View File

@@ -3,7 +3,6 @@ module github.com/hpcng/warewulf
go 1.16 go 1.16
require ( require (
github.com/brotherpowers/ipsubnet v0.0.0-20170914094241-30bc98f0a5b1
github.com/containers/image/v5 v5.7.0 github.com/containers/image/v5 v5.7.0
github.com/containers/storage v1.30.0 github.com/containers/storage v1.30.0
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e

2
go.sum
View File

@@ -98,8 +98,6 @@ github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngE
github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/brotherpowers/ipsubnet v0.0.0-20170914094241-30bc98f0a5b1 h1:80OMQcGycPqKFFabSaxOagCh7mgspnMl/X3YGmNi+j0=
github.com/brotherpowers/ipsubnet v0.0.0-20170914094241-30bc98f0a5b1/go.mod h1:mm9ZF6W76SwZtJpYzrVmTMuzmIhPX0SIuEosW/OTFd4=
github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=

View File

@@ -44,7 +44,7 @@ func init() {
ConfigFile = path.Join(conf.Paths.Sysconfdir, "warewulf/nodes.conf") ConfigFile = path.Join(conf.Paths.Sysconfdir, "warewulf/nodes.conf")
} }
if DefaultConfig == "" { if DefaultConfig == "" {
DefaultConfig = path.Join(conf.Paths.Sysconfdir, "warewulf/defaults.conf") DefaultConfig = path.Join(conf.Paths.Datadir, "warewulf/defaults.conf")
} }
cachedDB.current = false cachedDB.current = false
cachedDB.persist = true cachedDB.persist = true
@@ -114,12 +114,6 @@ for every node
*/ */
func (config *NodeYaml) FindAllNodes() ([]NodeInfo, error) { func (config *NodeYaml) FindAllNodes() ([]NodeInfo, error) {
var ret []NodeInfo var ret []NodeInfo
/*
wwconfig, err := warewulfconf.New()
if err != nil {
return ret, err
}
*/
var defConf map[string]*NodeConf var defConf map[string]*NodeConf
wwlog.Verbose("Opening defaults from file failed %s\n", DefaultConfig) wwlog.Verbose("Opening defaults from file failed %s\n", DefaultConfig)
defData, err := os.ReadFile(DefaultConfig) defData, err := os.ReadFile(DefaultConfig)

View File

@@ -33,7 +33,6 @@ func New() (conf ControllerConf) {
cachedConf = conf cachedConf = conf
cachedConf.readConf = false cachedConf.readConf = false
cachedConf.current = true cachedConf.current = true
} else { } else {
// If cached struct isn't empty, use it as the return value // If cached struct isn't empty, use it as the return value
conf = cachedConf conf = cachedConf