Refactor wwctl <node|profile> edit and fix bugs
`wwctl node edit` appears to not be working properly since MergeNode. This refactor, partly towards #918, resolves the issues with `node edit` and updates `profile edit` to match. Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -3,6 +3,7 @@ package node
|
||||
import (
|
||||
"os"
|
||||
"sort"
|
||||
"syscall"
|
||||
|
||||
warewulfconf "github.com/warewulf/warewulf/internal/pkg/config"
|
||||
"github.com/warewulf/warewulf/internal/pkg/wwlog"
|
||||
@@ -10,6 +11,10 @@ import (
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func CanWriteConfig() bool {
|
||||
return syscall.Access(warewulfconf.Get().Paths.NodesConf(), syscall.O_RDWR) == nil
|
||||
}
|
||||
|
||||
/*
|
||||
Creates a new nodeDb object from the on-disk configuration
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user