Refactor and document config/datastructure
Also adjusted case for initialisms (e.g., DHCP, TFTP, NFS). Signed-off-by: Jonathon Anderson <janderson@ciq.co>
This commit is contained in:
@@ -18,7 +18,7 @@ func NFS() error {
|
||||
|
||||
controller := warewulfconf.Get()
|
||||
|
||||
if controller.Nfs.Enabled {
|
||||
if controller.NFS.Enabled {
|
||||
if controller.Warewulf.EnableHostOverlay {
|
||||
err := overlay.BuildHostOverlay()
|
||||
if err != nil {
|
||||
@@ -28,13 +28,13 @@ func NFS() error {
|
||||
wwlog.Info("host overlays are disabled, did not modify exports")
|
||||
}
|
||||
fmt.Printf("Enabling and restarting the NFS services\n")
|
||||
if controller.Nfs.SystemdName == "" {
|
||||
if controller.NFS.SystemdName == "" {
|
||||
err := util.SystemdStart("nfs-server")
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to start nfs-server")
|
||||
}
|
||||
} else {
|
||||
err := util.SystemdStart(controller.Nfs.SystemdName)
|
||||
err := util.SystemdStart(controller.NFS.SystemdName)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to start")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user