Return OnBoot to wwtype.WWbool
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -79,7 +79,7 @@ type KernelConf struct {
|
||||
|
||||
type NetDev struct {
|
||||
Type string `yaml:"type,omitempty" lopt:"type" sopt:"T" comment:"Set device type of given network"`
|
||||
OnBoot *bool `yaml:"onboot,omitempty" lopt:"onboot" comment:"Enable/disable network device (true/false)"`
|
||||
OnBoot wwtype.WWbool `yaml:"onboot,omitempty" lopt:"onboot" comment:"Enable/disable network device (true/false)"`
|
||||
Device string `yaml:"device,omitempty" lopt:"netdev" sopt:"N" comment:"Set the device for given network"`
|
||||
Hwaddr string `yaml:"hwaddr,omitempty" lopt:"hwaddr" sopt:"H" comment:"Set the device's HW address for given network" type:"MAC"`
|
||||
Ipaddr net.IP `yaml:"ipaddr,omitempty" comment:"IPv4 address in given network" sopt:"I" lopt:"ipaddr" type:"IP"`
|
||||
|
||||
@@ -3,8 +3,10 @@ nodes:
|
||||
primary network: untagged
|
||||
network devices:
|
||||
untagged:
|
||||
onboot: true
|
||||
device: eth0
|
||||
tagged:
|
||||
onboot: true
|
||||
type: vlan
|
||||
device: eth0.902
|
||||
tags:
|
||||
|
||||
@@ -14,7 +14,7 @@ master={{ $master }}
|
||||
type=ethernet
|
||||
{{- else }}
|
||||
type={{if $netdev.Type}}{{ $netdev.Type }}{{ else }}ethernet{{end}}
|
||||
{{- if or $netdev.OnBoot (eq $netdev.OnBoot nil) }}
|
||||
{{- if $netdev.OnBoot }}
|
||||
autoconnect=true
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -53,7 +53,6 @@ const debian_interfaces string = `backupFile: true
|
||||
writeFile: true
|
||||
Filename: default
|
||||
# This file is autogenerated by warewulf
|
||||
auto wwnet0
|
||||
allow-hotplug wwnet0
|
||||
iface wwnet0 inet static
|
||||
address 192.168.3.21
|
||||
@@ -64,7 +63,6 @@ backupFile: true
|
||||
writeFile: true
|
||||
Filename: secondary
|
||||
# This file is autogenerated by warewulf
|
||||
auto wwnet1
|
||||
allow-hotplug wwnet1
|
||||
iface wwnet1 inet static
|
||||
address 192.168.3.22
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{- range $devname, $netdev := .ThisNode.NetDevs }}
|
||||
{{- file $devname }}
|
||||
# This file is autogenerated by warewulf
|
||||
{{- if or $netdev.OnBoot (eq $netdev.OnBoot nil) }}
|
||||
{{- if $netdev.OnBoot }}
|
||||
auto {{ $netdev.Device }}
|
||||
{{- end }}
|
||||
allow-hotplug {{ $netdev.Device }}
|
||||
|
||||
@@ -83,7 +83,6 @@ IPADDR=192.168.3.21
|
||||
NETMASK=255.255.255.0
|
||||
GATEWAY=192.168.3.1
|
||||
HWADDR=e6:92:39:49:7b:03
|
||||
ONBOOT=true
|
||||
IPV6INIT=yes
|
||||
IPV6_AUTOCONF=yes
|
||||
IPV6_DEFROUTE=yes
|
||||
@@ -102,7 +101,6 @@ IPADDR=192.168.3.22
|
||||
NETMASK=255.255.255.0
|
||||
GATEWAY=192.168.3.1
|
||||
HWADDR=9a:77:29:73:14:f1
|
||||
ONBOOT=true
|
||||
IPV6INIT=yes
|
||||
IPV6_AUTOCONF=yes
|
||||
IPV6_DEFROUTE=yes
|
||||
|
||||
@@ -3,8 +3,10 @@ nodes:
|
||||
primary network: untagged
|
||||
network devices:
|
||||
untagged:
|
||||
onboot: true
|
||||
device: eth0
|
||||
tagged:
|
||||
onboot: true
|
||||
type: vlan
|
||||
device: eth0.902
|
||||
tags:
|
||||
|
||||
@@ -27,7 +27,7 @@ GATEWAY={{ $netdev.Gateway }}
|
||||
{{- if $netdev.Hwaddr }}
|
||||
HWADDR={{ $netdev.Hwaddr }}
|
||||
{{- end }}
|
||||
{{ if or $netdev.OnBoot (eq $netdev.OnBoot nil) -}}
|
||||
{{- if $netdev.OnBoot }}
|
||||
ONBOOT=true
|
||||
{{- end }}
|
||||
IPV6INIT=yes
|
||||
|
||||
@@ -3,8 +3,10 @@ nodes:
|
||||
primary network: untagged
|
||||
network devices:
|
||||
untagged:
|
||||
onboot: true
|
||||
device: eth0
|
||||
tagged:
|
||||
onboot: true
|
||||
type: vlan
|
||||
device: eth0.902
|
||||
tags:
|
||||
|
||||
@@ -65,7 +65,7 @@ This file is autogenerated by warewulf
|
||||
<name>wwnet0</name>
|
||||
<link-type>ethernet</link-type>
|
||||
<control>
|
||||
<mode>boot</mode>
|
||||
<mode>manual</mode>
|
||||
</control>
|
||||
<firewall/>
|
||||
<link/>
|
||||
@@ -99,7 +99,7 @@ This file is autogenerated by warewulf
|
||||
<name>wwnet1</name>
|
||||
<link-type>ethernet</link-type>
|
||||
<control>
|
||||
<mode>boot</mode>
|
||||
<mode>manual</mode>
|
||||
</control>
|
||||
<firewall/>
|
||||
<link/>
|
||||
|
||||
@@ -18,7 +18,7 @@ This file is autogenerated by warewulf
|
||||
<mtu>{{ $netdev.MTU }}</mtu>
|
||||
{{- end }}
|
||||
<control>
|
||||
<mode>{{ if or $netdev.OnBoot (eq $netdev.OnBoot nil) }}boot{{ else }}manual{{end}}</mode>
|
||||
<mode>{{ if $netdev.OnBoot }}boot{{ else }}manual{{ end }}</mode>
|
||||
</control>
|
||||
<firewall/>
|
||||
<link/>
|
||||
|
||||
Reference in New Issue
Block a user