Fixing oddball network configuration parameters
This commit is contained in:
@@ -181,10 +181,6 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
n.NetDevs[SetNetName] = &nd
|
||||
|
||||
if SetNetDev == "" {
|
||||
n.NetDevs[SetNetName].Device.Set(SetNetName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
/******
|
||||
|
||||
Reference in New Issue
Block a user