From 216b55af073bbfcbf971ad297a065cb01b16c878 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Sat, 21 Sep 2024 02:13:35 -0600 Subject: [PATCH] Add autoconnect / onboot support to Suse wicked Signed-off-by: Jonathon Anderson --- CHANGELOG.md | 2 +- .../rootfs/etc/wicked/ifconfig/ifcfg.xml.ww | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52e0d9e35..4bc82846a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/overlays/wwinit/rootfs/etc/wicked/ifconfig/ifcfg.xml.ww b/overlays/wwinit/rootfs/etc/wicked/ifconfig/ifcfg.xml.ww index 1afb0ea8b..d40663f1a 100644 --- a/overlays/wwinit/rootfs/etc/wicked/ifconfig/ifcfg.xml.ww +++ b/overlays/wwinit/rootfs/etc/wicked/ifconfig/ifcfg.xml.ww @@ -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 }} - {{$netdev.Device}} - {{ if $netdev.Type -}} - {{ $netdev.Type }} + {{$netdev.Device.Get}} + {{ if $netdev.Type.Get -}} + {{ $netdev.Type.Get }} {{ end -}} - {{ if $netdev.MTU -}} - {{ $netdev.MTU }} + {{ if $netdev.MTU.Get -}} + {{ $netdev.MTU.Get }} {{ end -}} - boot + {{ if $netdev.OnBoot.GetB -}}boot{{ else }}manual{{end}} @@ -29,12 +29,12 @@ Source: {{ $source }}
- {{$netdev.IpCIDR}} + {{$netdev.IpCIDR.Get}}
-{{ if $netdev.Gateway -}} +{{ if $netdev.Gateway.Get -}} - {{$netdev.Gateway}} + {{$netdev.Gateway.Get}} {{ end -}} @@ -44,10 +44,10 @@ Source: {{ $source }} prefer-public false -{{ if $netdev.Ipaddr6 -}} +{{ if $netdev.Ipaddr6.Get -}}
- {{ $netdev.Ipaddr6 }} + {{ $netdev.Ipaddr6.Get }}
{{ end -}}