diff options
author | Luca BRUNO <luca.bruno@coreos.com> | 2022-09-19 10:09:17 +0000 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-09-20 13:57:26 +0200 |
commit | 72ceee435d9d585115bd89f8aca4883d240cd387 (patch) | |
tree | e6ac541ee3362996fc73f8297409d167974c3830 /docs | |
parent | 55b5daf9b2b7e0c8b77de4f87986832447e72b84 (diff) | |
download | systemd-72ceee435d9d585115bd89f8aca4883d240cd387.tar.gz |
docs: add a note about selectively overriding default dependencies
This documents that explicit `Before=`/`After=` dependencies can be
used to selectively override implicit ordering coming from default
dependencies. That allows for more granular control compared to the
already documented `DefaultDependencies=no` option.
The alternative approach came up in a discussion around the ordering
of `boot-complete.target`, so this also adds an explicit suggestion
in that direction to the "Automatic Boot Assessment" documentation.
Ref: https://lists.freedesktop.org/archives/systemd-devel/2022-September/048330.html
Diffstat (limited to 'docs')
-rw-r--r-- | docs/AUTOMATIC_BOOT_ASSESSMENT.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/AUTOMATIC_BOOT_ASSESSMENT.md b/docs/AUTOMATIC_BOOT_ASSESSMENT.md index c1173cf509..c2a53f48dc 100644 --- a/docs/AUTOMATIC_BOOT_ASSESSMENT.md +++ b/docs/AUTOMATIC_BOOT_ASSESSMENT.md @@ -197,6 +197,14 @@ are a couple of recommendations. wrap them in a unit and order them after `boot-complete.target`, pulling it in. + Such unit would be typically wanted (or required) by one of the + [`bootup`](https://www.freedesktop.org/software/systemd/man/bootup.html) targets, + for example `multi-user.target`. To avoid potential loops due to conflicting + [default dependencies](https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Default%20Dependencies) + ordering, it is recommended to also add an explicit dependency (e.g. + `After=multi-user.target`) to the unit. This overrides the implicit ordering + and allows `boot-complete.target` to start after the given bootup target. + ## FAQ 1. *I have a service which — when it fails — should immediately cause a |