Revert "Move configuration code out of wwctl"

This commit is contained in:
Gregory M. Kurtzer
2022-02-11 16:20:05 -08:00
committed by GitHub
parent 5a7f99af18
commit 67ee3bf5f8
33 changed files with 685 additions and 683 deletions

View File

@@ -1,32 +0,0 @@
package configure
import (
"fmt"
"github.com/pkg/errors"
)
func Configure(s string, v bool) error {
if !v {
fmt.Printf("################################################################################\n")
fmt.Printf("Configuring: %s\n", s)
}
var err error
switch s {
case "DHCP":
err = configureDHCP(v)
case "hosts":
err = configureHosts(v)
case "NFS":
err = configureNFS(v)
case "SSH":
err = configureSSH(v)
case "TFTP":
err = configureTFTP(v)
}
if err != nil {
return errors.Wrap(err, "Failed to configure "+s)
}
return nil
}