1
0
mirror of https://github.com/systemd/systemd synced 2024-07-08 20:15:55 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
Lennart Poettering
1a30285590 network-generator: pick up .netdev/.link/.network configuration via credentials
To me this is the last major basic functionality that couldn't be
configured via credentials: the network.

We do not invent any new format for this, but simply copy relevant creds
1:1 into /run/systemd/network/ to open up the full functionality of
networkd to VM hosts.
2024-01-08 12:59:08 +01:00
Luca Boccassi
b0d3095fd6 Drop split-usr and unmerged-usr support
As previously announced, execute order 66:

https://lists.freedesktop.org/archives/systemd-devel/2022-September/048352.html

The meson options split-usr, rootlibdir and rootprefix become no-ops
that print a warning if they are set to anything other than the
default values. We can remove them in a future release.
2023-07-28 19:34:03 +01:00
Zbigniew Jędrzejewski-Szmek
7c0e2b5559 units: add ordering dependencies on initrd-switch-root.target
For shutdown, we queue shutdown.target/start, so in every unit which should be
stopped *before* shutdown, we need both Conflicts and an ordering dependency
with shutdown.target (either Before= or After= would work, because stop jobs
are always ordered before start jobs).

For initrd transition, we queue initrd-switch-root.service/isolate. This
automatically creates a /stop job for every running unit without
IgnoreOnIsolate. But no ordering dependency is created, unless the unit has a
(possibly transitive) ordering dependency on initrd-switch-root.service.
Since most units must stop before the transition, we should add the ordering
dependency. It is nicer to use Before=initrd-switch-root.target for this.
initrd-switch-root.target is ordered before initrd-switch-root.service, so
the effect it the same when both are in a transaction.

Fixes #23745.

To also cover the case where somebody is emergency mode in the initrd and
queues initrd-switch-root.service/start (not isolate), also add
Conflicts=initrd-switch-root.target, so various units are stopped properly.
This extends 2525682565 to cover all the other
services that are touched. It could be consider "operator error", but it's
easy to make and it's nicer if we can make this more foolproof.
2022-09-15 14:59:11 +02:00
Zbigniew Jędrzejewski-Szmek
d5fd07cdee units/systemd-network-generator.service: add forgotten ordering for shutdown 2022-09-15 14:59:11 +02:00
Zbigniew Jędrzejewski-Szmek
9810e41942 units: reorder/split unit dependency blocks
The block is reordered and split to have:
  1. description + documentation
  2. (optionally) conditions
  3. all the dependencies
I think it's easier to read the units this way.
Also, the Conflicts+Before is seperated out to separate lines.
The ordering dependency is "fake", because it could just as well be
After=, we are adding it to force ordering wrt. shutdown.target, and
it plays a different role than the other Before=, which are about a
real ordering on boot.
2022-09-15 14:59:11 +02:00
Yu Watanabe
85e8650827 unit: run network-generator before starting udevd
Otherwise, .link files generated by the service may not be loaded by
udevd.
2021-12-16 01:44:17 +09:00
Zbigniew Jędrzejewski-Szmek
059cc610b7 meson: use jinja2 for unit templates
We don't need two (and half) templating systems anymore, yay!

I'm keeping the changes minimal, to make the diff manageable. Some enhancements
due to a better templating system might be possible in the future.

For handling of '## ' — see the next commit.
2021-05-19 10:24:43 +09:00
Yu Watanabe
db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Franck Bui
e730db6c90 systemd-network-generator.service: network-pre.target is a passive target unit 2020-03-27 18:30:57 +01:00
Yu Watanabe
5197b41fac
Merge pull request #15022 from keszybz/make-units-remain-after-exit
Make units remain after exit
2020-03-06 21:14:36 +09:00
Zbigniew Jędrzejewski-Szmek
d48eea583f units: make systemd-network-generator.service stay around
Once done, its done, and shouldn't be run again.
2020-03-05 15:15:08 +01:00
Zbigniew Jędrzejewski-Szmek
4a29c185b7 man: add systemd-network-generator.service(8)
It's a bit bare-bones, but it should be enough to point the reader in the right
direction.
2020-03-05 08:20:06 +01:00
Yu Watanabe
e2e05a0e4a unit: rename initrd-network-generator.service -> systemd-network-generator.service 2019-07-30 02:30:09 +09:00