dracut/SOURCES/0088.patch
2021-09-09 16:12:04 +00:00

35 lines
1.1 KiB
Diff

From 7143750cf2e37f9c14ec47a8170b9186136874d7 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Wed, 24 Jun 2020 13:09:04 +0200
Subject: [PATCH] cms: regenerate NetworkManager connections
After changing the kernel command line, the cmsifup script calls ifup
to activate the interface. However, ifup is only available in the
network-legacy module; when using the network-manager module, we
should regenerate connections according to the command line; then
later NM will be run and will activate the device.
(cherry picked from commit 5c3d0a96473ac339fa2d1b25213b8f301c1cfd0d)
Resolves: #1847518
---
modules.d/80cms/cmsifup.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh
index 902df8d8..77c18452 100755
--- a/modules.d/80cms/cmsifup.sh
+++ b/modules.d/80cms/cmsifup.sh
@@ -35,4 +35,9 @@ fi
IFACES="$IFACES $DEVICE"
echo "$IFACES" >> /tmp/net.ifaces
-exec ifup "$DEVICE"
+if [ -x /usr/libexec/nm-initrd-generator ]; then
+ type nm_generate_connections >/dev/null 2>&1 || . /lib/nm-lib.sh
+ nm_generate_connections
+else
+ exec ifup "$DEVICE"
+fi