From 6428534dc379edd48f1553ba5dcd13498d0193ab Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Thu, 20 Apr 2023 02:50:47 -0600 Subject: [PATCH] Configure ONBOOT with netdev.OnBoot Closes #644 Signed-off-by: Jonathon Anderson --- CHANGELOG.md | 4 ++++ overlays/wwinit/etc/sysconfig/network-scripts/ifcfg.ww | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 405996e4..5c68becc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Restrict access to `/warewulf/config` to root only. (#728, #742) - KERNEL VERSION column is too short. #690 - Add support for resolving absolute path automatically. #493 +- The network device "OnBoot" parameter correctly configures the ONBOOT ifcfg + parameter. (#644) ### Changed @@ -34,6 +36,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `wwctl --emptyconf genconfig warewulfconf print` for the available paths. - Added experimental dnsmasq support. - Refactored `profile add` command to make it alike `node add`. #658 #659 +- The ifcfg ONBOOT parameter is no longer statically `true`, so unconfigured + interfaces may not be enabled by default. (#644) - new subcommand `wwctl genconf` is available with following subcommands: * `completions` which will create the files used for bash-completion. Also diff --git a/overlays/wwinit/etc/sysconfig/network-scripts/ifcfg.ww b/overlays/wwinit/etc/sysconfig/network-scripts/ifcfg.ww index 5de10792..53192fa5 100644 --- a/overlays/wwinit/etc/sysconfig/network-scripts/ifcfg.ww +++ b/overlays/wwinit/etc/sysconfig/network-scripts/ifcfg.ww @@ -24,7 +24,9 @@ HWADDR={{ $netdev.Hwaddr }} {{ if $netdev.Type -}} TYPE={{ $netdev.Type }} {{ end -}} -ONBOOT=yes +{{ if $netdev.OnBoot -}} +ONBOOT={{ $netdev.OnBoot }} +{{ end -}} IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes