This commit removes the dracut module for the NetworkManager fcfg-rh
plugin (`nm-fcfg-rh`), effectively discontinuing its support within dracut.
The `fcfg-rh` plugin for NetworkManager provides backward compatibility
with the legacy `ifcfg` network configuration format.
This format, traditionally found in `/etc/sysconfig/network-scripts/`,
was the standard method for configuring network interfaces on Red Hat-based
distributions for many years. It relies on a collection of shell-script-like
files to define network connections.
While functional for basic configurations, the `ifcfg` format has several
limitations in the context of modern networking and the capabilities of NetworkManager.
The removal of the `nm-fcfg-rh` support from dracut is a forward-looking change
that aligns with the broader trend in the Linux ecosystem to modernize network configuration.
The key reasons for this decision are as follows:
* **Deprecation by Upstream and Distributions:**
The `fcfg-rh` plugin is considered deprecated by the NetworkManager project
and major Linux distributions, such as Fedora and its derivatives.
These distributions are actively migrating users away from the legacy `ifcfg` format
in favor of the more robust `keyfile` format.
See https://networkmanager.dev/docs/api/latest/nm-settings-ifcfg-rh.html.
echo "${UUID//-/}" > "$initdir/etc/machine-id"
fi
- # We don't install the ifcfg files from the host automatically.
- # But the user might choose to include them, so we pull in the machinery to read them.
- inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so"
-
_arch=${DRACUT_ARCH:-$(uname -m)}
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
ConditionPathExistsGlob=|/usr/lib/NetworkManager/system-connections/*
ConditionPathExistsGlob=|/run/NetworkManager/system-connections/*
ConditionPathExistsGlob=|/etc/NetworkManager/system-connections/*
-ConditionPathExistsGlob=|/etc/sysconfig/network-scripts/ifcfg-*
[Service]
Type=dbus
if getargbool 0 rd.neednet; then
for i in /usr/lib/NetworkManager/system-connections/* \
/run/NetworkManager/system-connections/* \
- /etc/NetworkManager/system-connections/* \
- /etc/sysconfig/network-scripts/ifcfg-*; do
+ /etc/NetworkManager/system-connections/*; do
[ -f "$i" ] || continue
echo '[ -f /tmp/nm.done ]' > "$hookdir"/initqueue/finished/nm.sh
mkdir -p /run/NetworkManager/initrd
if [ -e /run/NetworkManager/initrd/neednet ]; then
for i in /usr/lib/NetworkManager/system-connections/* \
/run/NetworkManager/system-connections/* \
- /etc/NetworkManager/system-connections/* \
- /etc/sysconfig/network-scripts/ifcfg-*; do
+ /etc/NetworkManager/system-connections/*; do
[ -f "$i" ] || continue
/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
break