Revert "Move configuration code out of wwctl"
This commit is contained in:
committed by
GitHub
parent
5a7f99af18
commit
67ee3bf5f8
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user