Commit Graph

12 Commits (22d6863ef1b2eb2a22264f2bfdb2b9329ab5dfdb)

Author SHA1 Message Date
Harald Hoyer 22d6863ef1 fix(network-manager): cope with distributions not using `libexec` 2021-05-14 08:35:22 +02:00
Harald Hoyer 373eadaa9c style: make indent and let shfmt fail again
The bump of removed the `-d` option for `shfmt`. Readd it until upstream
is fixed.

See also:
https://github.com/luizm/action-sh-checker/issues/44
2021-05-04 15:39:55 +02:00
Jóhann B. Guðmundsson 69f4e7cdc3 fix(udev-rules): remove sourcing of network link files
Removing sourcing of network link files from the udev-rules module.
What always should be included should be placed in the systemd-network
module and other modules that provide/require spesific link files
should add them, themselves via their relevant include section.
2021-05-03 10:07:48 +02:00
Beniamino Galvani 112f03f9e2 feat(network-manager): run as daemon with D-Bus
This commit changes how NM is started inside the initrd. Instead of running NM
in the special --configure-and-quit=initrd mode, which sets up network and
quits, start it as a daemon.

This has multiple advantages. First, we no longer need to run NM in a special
mode that requires additional code and maintenance. NetworkManager works
exactly as in the real root.

One problem of the current configure-and-quit approach is that once NM has
quit, dynamic addresses can expire if the initrd setup takes longer than the
DHCP lease interval or than the IPv6 address lifetime. Running NM as a service
solves this problem.

Now NM runs with D-Bus support and therefore its API can be used by other
modules. This open the possibility, for example, to integrate nm-cloud-setup to
automatically configure networking based on cloud metadata.

Use the NetworkManager-wait-online.service, ordered before
dracut-initqueue.service, to delay the initqueue until NM has terminated its
configuration.
2021-04-16 16:15:00 +02:00
Harald Hoyer 25f6841344 fix(network-manager): shellcheck for modules.d/35network-manager 2021-03-26 15:02:59 +01:00
Lukas Nykryn c17c5b7604 fix(network-manager): run as a service if systemd module is present
In the current state, services that depend on network need to
use dracut hooks, since nothing with pull in the network
targets into the transaction.

In the future, it would be nice to provide developers on systemd-only
systems the possibility to not use dracut hooks at all, but simply put
normal systemd services into the initrd.

Also, some modules even right now depend on systemd ordering, like
cryptsetup, so let's make sure, that the ordering inside systemd work
properly as well.
2021-02-19 11:20:59 +01:00
Zoltán Böszörményi 767fbf81b6 fix(network-manager): allow override network manager version
With dracutsysrootdir set and foreign binaries in sysroot,
running NetworkManager --version is not possible and it may be
different than the one installed on the host.
NM_VERSION can be used to override it.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
2021-02-09 07:09:28 +00:00
Beniamino Galvani 6e1e87cd25 network-manager: move connection generation to a lib file
Move the connection generation code to a library file so that it can
be reused from other places.
2020-06-25 10:58:34 +02:00
Peter Georg faea4e4ddb Always pull in machinery to read ifcfg files
So far machinery is only pulled in if the user has not yet included any
ifcfg files.
2020-04-21 22:27:11 +02:00
Beniamino Galvani 87bffc36e7 network-manager: install libnss DNS and mDNS plugins
Install libnss_dns.so and libnss_mdns4_minimal.so plugins for the Name
Service Switch (NSS) functionality of glibc so that name resolution
through /etc/resolv.conf and mDNS works in the initrd.

Fixes: #772
2020-04-20 16:47:56 +02:00
Colin Walters 7fea85ce5f modules/network-manager: Install `ip`
We don't need `ip` but having it is *really* useful for people debugging
in an emergency shell.
2020-01-14 09:17:22 +01:00
Lubomir Rintel 08bdadbf31 network-manager: add module 2018-09-21 11:32:01 +02:00