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