Merge pull request #1410 from anderbubble/1278-onboot
Configure onboot for NetworkManager, debian networking, and wicked
This commit is contained in:
@@ -63,6 +63,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Fix autodetected kernel sorting issue. #1332
|
||||
- Avoid panic on container import #1244
|
||||
- make sure that warewulfd has the permission 0755 at creation time #674
|
||||
- Fix "onboot" behavior for NetworkManager, Debian networking, and Suse wicked. #1278
|
||||
|
||||
## v4.5.7, 2024-09-11
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ master={{ $master }}
|
||||
type=ethernet
|
||||
{{ else }}
|
||||
type={{ $netdev.Type }}
|
||||
autoconnect=true
|
||||
autoconnect={{ $netdev.OnBoot }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
{{- $host := .BuildHost }}
|
||||
{{- $time := .BuildTime }}
|
||||
{{- $source := .BuildSource }}
|
||||
{{range $devname, $netdev := .NetDevs -}}
|
||||
{{range $devname, $netdev := .ThisNode.NetDevs -}}
|
||||
{{- $filename := print $devname }}
|
||||
{{- file $filename }}
|
||||
# This file is autogenerated by warewulf
|
||||
# Host: {{ $host }}
|
||||
# Time: {{ $time }}
|
||||
# Source: {{ $source }}
|
||||
auto {{$netdev.Device}}
|
||||
allow-hotplug {{$netdev.Device}}
|
||||
iface {{$netdev.Device}} inet static
|
||||
address {{$netdev.Ipaddr}}
|
||||
netmask {{$netdev.Netmask}}
|
||||
gateway {{$netdev.Gateway}}
|
||||
mtu {{$netdev.MTU}}
|
||||
up ifmetric {{$netdev.Device}} 30
|
||||
{{ if $netdev.OnBoot.GetB -}}
|
||||
auto {{$netdev.Device.Get}}
|
||||
{{ end -}}
|
||||
allow-hotplug {{$netdev.Device.Get}}
|
||||
iface {{$netdev.Device.Get}} inet static
|
||||
address {{$netdev.Ipaddr.Get}}
|
||||
netmask {{$netdev.Netmask.Get}}
|
||||
gateway {{$netdev.Gateway.Get}}
|
||||
mtu {{$netdev.MTU.Get}}
|
||||
up ifmetric {{$netdev.Device.Get}} 30
|
||||
{{- end}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{- $host := .BuildHost }}
|
||||
{{- $time := .BuildTime }}
|
||||
{{- $source := .BuildSource }}
|
||||
{{range $devname, $netdev := .NetDevs -}}
|
||||
{{range $devname, $netdev := .ThisNode.NetDevs -}}
|
||||
{{- $filename := print "ifcfg-" $devname ".xml" }}
|
||||
{{- file $filename }}
|
||||
<!--
|
||||
@@ -11,15 +11,15 @@ Time: {{ $time }}
|
||||
Source: {{ $source }}
|
||||
-->
|
||||
<interface origin="static generated warewulf config">
|
||||
<name>{{$netdev.Device}}</name>
|
||||
{{ if $netdev.Type -}}
|
||||
<link-type>{{ $netdev.Type }}</link-type>
|
||||
<name>{{$netdev.Device.Get}}</name>
|
||||
{{ if $netdev.Type.Get -}}
|
||||
<link-type>{{ $netdev.Type.Get }}</link-type>
|
||||
{{ end -}}
|
||||
{{ if $netdev.MTU -}}
|
||||
<mtu>{{ $netdev.MTU }}</mtu>
|
||||
{{ if $netdev.MTU.Get -}}
|
||||
<mtu>{{ $netdev.MTU.Get }}</mtu>
|
||||
{{ end -}}
|
||||
<control>
|
||||
<mode>boot</mode>
|
||||
<mode>{{ if $netdev.OnBoot.GetB -}}boot{{ else }}manual{{end}}</mode>
|
||||
</control>
|
||||
<firewall/>
|
||||
<link/>
|
||||
@@ -29,12 +29,12 @@ Source: {{ $source }}
|
||||
</ipv4>
|
||||
<ipv4:static>
|
||||
<address>
|
||||
<local>{{$netdev.IpCIDR}}</local>
|
||||
<local>{{$netdev.IpCIDR.Get}}</local>
|
||||
</address>
|
||||
{{ if $netdev.Gateway -}}
|
||||
{{ if $netdev.Gateway.Get -}}
|
||||
<route>
|
||||
<nexthop>
|
||||
<gateway>{{$netdev.Gateway}}</gateway>
|
||||
<gateway>{{$netdev.Gateway.Get}}</gateway>
|
||||
</nexthop>
|
||||
</route>
|
||||
{{ end -}}
|
||||
@@ -44,10 +44,10 @@ Source: {{ $source }}
|
||||
<privacy>prefer-public</privacy>
|
||||
<accept-redirects>false</accept-redirects>
|
||||
</ipv6>
|
||||
{{ if $netdev.Ipaddr6 -}}
|
||||
{{ if $netdev.Ipaddr6.Get -}}
|
||||
<ipv6:static>
|
||||
<address>
|
||||
<local>{{ $netdev.Ipaddr6 }}</local>
|
||||
<local>{{ $netdev.Ipaddr6.Get }}</local>
|
||||
</address>
|
||||
</ipv6:static>
|
||||
{{ end -}}
|
||||
|
||||
Reference in New Issue
Block a user