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 bb894df100
commit 78978ad233
15 changed files with 151 additions and 186 deletions

View File

@@ -2,7 +2,6 @@ package configure
import (
"fmt"
"os"
"github.com/hpcng/warewulf/internal/pkg/overlay"
"github.com/hpcng/warewulf/internal/pkg/util"
@@ -17,18 +16,11 @@ nfs server.
*/
func NFS() error {
controller, err := warewulfconf.New()
if err != nil {
wwlog.Error("%s", err)
os.Exit(1)
}
controller := warewulfconf.New()
if controller.Nfs.Enabled {
if err != nil {
fmt.Println(err)
}
if controller.Warewulf.EnableHostOverlay {
err = overlay.BuildHostOverlay()
err := overlay.BuildHostOverlay()
if err != nil {
wwlog.Warn("host overlay could not be built: %s", err)
}