From: Harald Hoyer Date: Thu, 22 Apr 2021 08:31:34 +0000 (+0200) Subject: fix(network-manager): run after dracut-cmdline X-Git-Tag: 054~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d03404f499064b354a58223895cc47dbb461da5;p=thirdparty%2Fdracut.git fix(network-manager): run after dracut-cmdline dracut-cmdline runs `nm-config.sh`, which generates the configurations. Also remove the now unused `nm-run.service`. --- diff --git a/modules.d/35network-manager/nm-initrd.service b/modules.d/35network-manager/nm-initrd.service index 6bd95fdc0..815797a40 100644 --- a/modules.d/35network-manager/nm-initrd.service +++ b/modules.d/35network-manager/nm-initrd.service @@ -2,6 +2,7 @@ DefaultDependencies=no Wants=systemd-udev-settle.service After=systemd-udev-settle.service +After=dracut-cmdline.service Before=network.target ConditionPathExists=/run/NetworkManager/initrd/neednet ConditionPathExistsGlob=|/usr/lib/NetworkManager/system-connections/* diff --git a/modules.d/35network-manager/nm-run.service b/modules.d/35network-manager/nm-run.service deleted file mode 100644 index f041ade89..000000000 --- a/modules.d/35network-manager/nm-run.service +++ /dev/null @@ -1,35 +0,0 @@ -# This file is part of dracut. -# SPDX-License-Identifier: GPL-2.0-or-later - -[Unit] -DefaultDependencies=no - -#make sure all devices showed up -Wants=systemd-udev-settle.service -After=systemd-udev-settle.service - -#pull the network targets into transaction -Wants=network.target network-online.target -Before=network.target network-online.target - -#run before we try to mount anything from the dracut hooks -Before=dracut-initqueue.service - -#do not run if networking not needed -ConditionPathExists=/run/NetworkManager/initrd/neednet - -#do not run, if there is no configuration -ConditionPathExistsGlob=|/usr/lib/NetworkManager/system-connections/* -ConditionPathExistsGlob=|/run/NetworkManager/system-connections/* -ConditionPathExistsGlob=|/etc/NetworkManager/system-connections/* -ConditionPathExistsGlob=|/etc/sysconfig/network-scripts/ifcfg-* - -[Service] -#run the script and wait before it finishes -Type=oneshot -ExecStart=/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon -#don't kill forked off processes (for example: teamd for teaming) -KillMode=process - -[Install] -WantedBy=initrd.target