Let's say I have a service target called 'pulp_celerybeat' that requires some content from the /var/lib/pulp directory in order to start. This directory contains RPM content (and quite a lot of it), so users may want to move this to a network share. When I do, this service no longer starts because it can happen that /var/lib/pulp isn't mounted. I've fixed this by creating: /etc/systemd/system/pulp_celerybeat.service.d/amendments.conf With: [Unit] RequireMountsFor=/var/lib/pulp Easy enough. But systemd knows about all the mount targets. It also knows that pulp_celerybeat uses /var/lib/pulp by this in the unit file: [Service] WorkingDirectory=/var/lib/pulp/celery/ Would it be possible to do this dependency management automatically? Alternatively, supporting some directive like "RequiresDir" that we could ship in the packaged unit files would be useful, so if a user does move our storage to a network share, systemd would set the right mount dependencies automatically.
This has been implemented a while back.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.