Skip to content

Commit

Permalink
Add autoconnect / onboot support to Suse wicked
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathon Anderson <[email protected]>
  • Loading branch information
anderbubble committed Sep 23, 2024
1 parent f88f350 commit 216b55a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +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 and Debian networking. #1278
- Fix "onboot" behavior for NetworkManager, Debian networking, and Suse wicked. #1278

## v4.5.7, 2024-09-11

Expand Down
24 changes: 12 additions & 12 deletions overlays/wwinit/rootfs/etc/wicked/ifconfig/ifcfg.xml.ww
Original file line number Diff line number Diff line change
@@ -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 }}
<!--
Expand All @@ -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/>
Expand All @@ -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 -}}
Expand All @@ -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 -}}
Expand Down

0 comments on commit 216b55a

Please sign in to comment.