From 08878d84e8b1ab436eca18ffe3bdae2aa441ff1cd2a3044733a7f174ea3b64f1 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 7 Mar 2022 10:15:55 +0000 Subject: [PATCH] Accepting request 959824 from home:favogt:combustion - Support the dracut network-manager module - Remove /var/lib/YaST2/reconfig_system on successful runs OBS-URL: https://build.opensuse.org/request/show/959824 OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/combustion?expand=0&rev=24 --- combustion | 17 +++++++++++++---- combustion-prepare.service | 5 +++-- combustion.changes | 10 ++++++++++ combustion.spec | 2 +- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/combustion b/combustion index c41bb61..12a192e 100644 --- a/combustion +++ b/combustion @@ -47,12 +47,19 @@ if [ "${1-}" = "--prepare" ]; then && grep -qE '^# combustion:(.*)\' "${config_mount}/combustion/script"; then sh -s < /etc/cmdline.d/40-combustion-neednet.conf - # Re-trigger generation of network rules and apply them - . /lib/dracut/hooks/pre-udev/60-net-genrules.sh - udevadm control --reload - udevadm trigger --subsystem-match net --action add + if [ -e /lib/dracut/hooks/pre-udev/60-net-genrules.sh ]; then + # Wicked + . /lib/dracut/hooks/pre-udev/60-net-genrules.sh + # Re-trigger generation of network rules and apply them + udevadm control --reload + udevadm trigger --subsystem-match net --action add + else + # NetworkManager + . /usr/lib/dracut/hooks/cmdline/99-nm-config.sh + fi EOF fi @@ -180,4 +187,6 @@ else chroot /sysroot snapper --no-dbus create -d "After combustion configuration" || : fi +rm -f /sysroot/var/lib/YaST2/reconfig_system + exit 0 diff --git a/combustion-prepare.service b/combustion-prepare.service index 3a6320e..0e4fad1 100644 --- a/combustion-prepare.service +++ b/combustion-prepare.service @@ -16,8 +16,9 @@ After=dev-combustion-config.device # device After=ignition-setup-user.service -# This reconfigures networking, which runs during the initqueue -Before=dracut-initqueue.service +# This reconfigures networking, which runs during the initqueue (wicked) +# or has its own service (NM) +Before=dracut-initqueue.service nm-initrd.service Conflicts=initrd-switch-root.target umount.target Conflicts=dracut-emergency.service emergency.service emergency.target diff --git a/combustion.changes b/combustion.changes index 14dfa3a..d9f4bf4 100644 --- a/combustion.changes +++ b/combustion.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Mar 3 11:58:07 UTC 2022 - Fabian Vogt + +- Support the dracut network-manager module + +------------------------------------------------------------------- +Mon Jan 24 11:44:57 UTC 2022 - Fabian Vogt + +- Remove /var/lib/YaST2/reconfig_system on successful runs + ------------------------------------------------------------------- Wed Nov 24 13:10:37 UTC 2021 - Dimitar Zahariev diff --git a/combustion.spec b/combustion.spec index 135b22e..2268ba8 100644 --- a/combustion.spec +++ b/combustion.spec @@ -1,7 +1,7 @@ # # spec file for package combustion # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed