Moving warewulfd code around and implementing new API for config.*()

This commit is contained in:
Gregory Kurtzer
2020-11-11 22:16:24 -08:00
parent 9a9672a060
commit fa2a7e26d3
18 changed files with 140 additions and 447 deletions

View File

@@ -27,12 +27,14 @@ func fileInclude(path string) string {
func Build(nodeList []assets.NodeInfo, force bool) error {
wwlog.Printf(wwlog.INFO, "Building Runtime Overlays:\n")
config := config.New()
wwlog.SetIndent(4)
for _, node := range nodeList {
if node.RuntimeOverlay != "" {
OverlayDir := path.Join(config.LocalStateDir, "/overlays/runtime/", node.RuntimeOverlay)
OverlayFile := path.Join(config.LocalStateDir, "/provision/overlays/runtime/", node.Fqdn+".img")
OverlayDir := config.RuntimeOverlaySource(node.RuntimeOverlay)
OverlayFile := config.RuntimeOverlayImage(node.Fqdn)
wwlog.Printf(wwlog.VERBOSE, "Building Runtime Overlay for: %s\n", node.Fqdn)