From 772f560b92964eacdde940842ff41ab49cd223e7 Mon Sep 17 00:00:00 2001 From: Alex Jaramillo Date: Tue, 10 Jun 2025 11:51:08 -0700 Subject: [PATCH] Default exception for networking This change modifies the behavior of the clr-installer. By default, the installer includes NetworkManager bundle in the list of bundles to be installed. This commit introduces an exception: if systemd-networkd is already present in the bundle list, the addition of NetworkManager will be skipped. Signed-off-by: Alex Jaramillo --- controller/controller.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/controller/controller.go b/controller/controller.go index 27826356..9efa765c 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -48,6 +48,7 @@ var ( const ( // NetWorkManager is the application to manage network. NetWorkManager = "Network Manager" + NetworkdBundle = "systemd-networkd-autostart" ) func sortMountPoint(bds []*storage.BlockDevice) []*storage.BlockDevice { @@ -343,8 +344,9 @@ func Install(rootDir string, model *model.SystemInstall, options args.Args) erro return err } - // If we are using NetworkManager add the basic bundle - if network.IsNetworkManagerActive() { + // If we are using NetworkManager add the basic bundle, unless + // we have systemd-networkd bundle, in which case skip it + if network.IsNetworkManagerActive() && !model.ContainsBundle(NetworkdBundle) { log.Info("Adding bundle '%s' to enable networking", network.RequiredBundle) model.AddBundle(network.RequiredBundle) }