module-setup.sh: Add "rd.neednet" parameter if network is needed

Upstream dracut now use network-manager module by default and since
upstream commit 3dcaa97, network-manager expects user to pass "rd.neednet"
to indicate network is required.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
Kairui Song 2020-05-28 02:20:20 +08:00
parent cfd93e2b7e
commit 0cc3b85d0d

View File

@ -408,6 +408,11 @@ kdump_install_net() {
kdump_setup_dns "$_netdev" kdump_setup_dns "$_netdev"
if [ ! -f ${initdir}/etc/cmdline.d/50neednet.conf ]; then
# network-manager module needs this parameter
echo "rd.neednet" >> ${initdir}/etc/cmdline.d/50neednet.conf
fi
# Save netdev used for kdump as cmdline # Save netdev used for kdump as cmdline
# Whoever calling kdump_install_net() is setting up the default gateway, # Whoever calling kdump_install_net() is setting up the default gateway,
# ie. bootdev/kdumpnic. So don't override the setting if calling # ie. bootdev/kdumpnic. So don't override the setting if calling