Stop dracut 35network-manager from running nm-initrd-generator

Resolves: bz2076416
Upstream: Fedora
Conflict: None

commit 62355ebe5a
Author: Coiby Xu <coxu@redhat.com>
Date:   Fri Sep 23 22:16:49 2022 +0800

    Stop dracut 35network-manager from running nm-initrd-generator

    kexec-tools depends on dracut's 35network-manager module which will
    call nm-initrd-generator. We don't want nm-initrd-generator to generate
    connection profiles since we  will copy them from 1st kernel to
    kdump kernel initramfs. NetworkManager >= 1.35.2 won't generate connection
    profiles if there's a connection dir with rd.neednet. For Fedora/RHEL,
    this connection dir is /etc/NetworkManager/system-connections. For the
    details, please refer to the NetworkManager commit 79885656d3
    ("initrd: don't add a connection if there's a connection dir with
    rd.neednet") [1]. Before the release of NetworkManager >= 1.35.2, we
    need to mask /usr/libexec/nm-initrd-generator.

    [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1010

    Signed-off-by: Coiby Xu <coxu@redhat.com>
    Reviewed-by: Thomas Haller <thaller@redhat.com>
    Reviewed-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
Coiby Xu 2022-11-23 09:42:18 +08:00
parent 214e9d0bef
commit 1141e03fa1
1 changed files with 5 additions and 0 deletions

View File

@ -465,6 +465,11 @@ kdump_install_nmconnections() {
exit 1
fi
done <<< "$(nmcli -t -f device,filename connection show --active)"
# Stop dracut 35network-manger to calling nm-initrd-generator.
# Note this line of code can be removed after NetworkManager >= 1.35.2
# gets released.
echo > "${initdir}/usr/libexec/nm-initrd-generator"
}
kdump_setup_bridge() {