diff --git a/internal/app/wwctl/node/set/main.go b/internal/app/wwctl/node/set/main.go index dfa7fd89..2522c087 100644 --- a/internal/app/wwctl/node/set/main.go +++ b/internal/app/wwctl/node/set/main.go @@ -181,10 +181,6 @@ func CobraRunE(cmd *cobra.Command, args []string) error { } n.NetDevs[SetNetName] = &nd - - if SetNetDev == "" { - n.NetDevs[SetNetName].Device.Set(SetNetName) - } } } diff --git a/internal/app/wwctl/profile/set/main.go b/internal/app/wwctl/profile/set/main.go index 7b4f958c..82fa2db1 100644 --- a/internal/app/wwctl/profile/set/main.go +++ b/internal/app/wwctl/profile/set/main.go @@ -145,17 +145,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error { if _, ok := p.NetDevs[SetNetName]; !ok { var nd node.NetDevEntry - SetNetOnBoot = "yes" - - if len(p.NetDevs) == 0 { - SetNetDefault = "yes" - } - p.NetDevs[SetNetName] = &nd - - if SetNetDev == "" { - p.NetDevs[SetNetName].Device.Set(SetNetName) - } } } diff --git a/internal/pkg/node/datastructure.go b/internal/pkg/node/datastructure.go index a66f96a0..7b273f82 100644 --- a/internal/pkg/node/datastructure.go +++ b/internal/pkg/node/datastructure.go @@ -41,16 +41,16 @@ type NodeConf struct { } type NetDevs struct { - Type string - OnBoot string - Device string - Hwaddr string - Ipaddr string + Type string `yaml:"type,omitempty"` + OnBoot string `yaml:"onboot,omitempty"` + Device string `yaml:"device,omitempty"` + Hwaddr string `yaml:"hwaddr,omitempty"` + Ipaddr string `yaml:"ipaddr,omitempty"` IpCIDR string `yaml:"ipcidr,omitempty"` Prefix string `yaml:"prefix,omitempty"` - Netmask string - Gateway string `yaml:"gateway"` - Default string + Netmask string `yaml:"netmask,omitempty"` + Gateway string `yaml:"gateway,omitempty"` + Default string `yaml:"default,omitempty"` } /******