extended tstruct for templating

- tstruct is in new datastructure.go
- updated fstab.ww to new syntax
This commit is contained in:
Christian Goll
2022-02-14 16:53:48 +01:00
committed by jcsiadal
parent 3a200a43f7
commit ad45200f7a
4 changed files with 68 additions and 45 deletions

View File

@@ -52,9 +52,9 @@ type NfsConf struct {
type NfsExportConf struct {
Path string `yaml:"path"`
ExportOptions string `yaml:"export options"`
MountOptions string `yaml:"mount options"`
Mount bool `yaml:"mount"`
ExportOptions string `default:"rw,sync" yaml:"export options"`
MountOptions string `default:"defaults" yaml:"mount options"`
Mount bool `default:"true" yaml:"mount"`
}
func (s *NfsConf) UnmarshalYAML(unmarshal func(interface{}) error) error {
@@ -70,7 +70,6 @@ func (s *NfsConf) UnmarshalYAML(unmarshal func(interface{}) error) error {
return nil
}
func init() {
if !util.IsFile(ConfigFile) {
wwlog.Printf(wwlog.ERROR, "Configuration file not found: %s\n", ConfigFile)
@@ -86,4 +85,4 @@ func init() {
func DataStore() string {
return cachedConf.Warewulf.DataStore
}
}