added warewulfconf as command line parameter

the environment variable WAREWULFCONF is also recognized

Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
Christian Goll
2023-03-03 11:18:49 +01:00
parent 29a6d39a24
commit 6b510865fe
15 changed files with 151 additions and 186 deletions

View File

@@ -290,11 +290,7 @@ func NodeStatus(nodeNames []string) (nodeStatusResponse *wwapiv1.NodeStatusRespo
Nodes map[string]*nodeStatusInternal `json:"nodes"`
}
controller, err := warewulfconf.New()
if err != nil {
wwlog.Error("%s", err)
return
}
controller := warewulfconf.New()
if controller.Ipaddr == "" {
err = fmt.Errorf("the Warewulf Server IP Address is not properly configured")