systemd: add initrd-specific services

Decouple from a specific initrd generator (dracut) the systemd services that
provide networking in the initrd using NM, thus allowing other systemd-based
initrd generators to take advantage of it.

These new services are:
- `NetworkManager-config-initrd.service`: it starts very early at boot, parses
the kernel command line using `nm-initrd-generator` and sets the
`/run/NetworkManager/initrd/neednet` flag to activate the other initrd services,
and also sets the hostname if needed.
- `NetworkManager-initrd.service`: it basically does the same job as the
`NetworkManager.service`, but in the initrd.
- `NetworkManager-wait-online-initrd.service`: ordered before
`network-online.target`, it will allow other services that require networking to
delay their start until NM has finished.
This commit is contained in:
Antonio Alvarez Feijoo
2025-02-25 12:16:35 +01:00
committed by Beniamino Galvani
parent a90efe91ad
commit 8640ea822f
7 changed files with 98 additions and 2 deletions

2
NEWS
View File

@@ -8,6 +8,8 @@ subject to change and not guaranteed to be compatible with
the later release.
USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
* Added systemd services to provide networking in the initrd.
=============================================
NetworkManager-1.52
Overview of changes since NetworkManager-1.50