core: add WantsMountsFor=

This is the equivalent of RequiresMountsFor=, but adds Wants= instead
of Requires=. It will be useful for example for the autogenerated
systemd-cryptsetup units.

Fixes https://github.com/systemd/systemd/issues/11646
This commit is contained in:
Luca Boccassi
2023-11-25 03:16:36 +00:00
parent 5fae156103
commit 9e615fa3aa
22 changed files with 227 additions and 120 deletions

View File

@@ -12,4 +12,4 @@ After=sysinit.target sockets.target paths.target slices.target tmp.mount
# require /var and /var/tmp, but only add a Wants= type dependency on /tmp, as
# we support that unit being masked, and this should not be considered an error.
RequiresMountsFor=/var /var/tmp
Wants=tmp.mount
WantsMountsFor=/tmp