[systemd-devel] Services with multiple pre-requisites

Lennart Poettering lennart at poettering.net
Tue Dec 22 13:51:11 UTC 2020


On Mo, 21.12.20 17:23, freedesktop at priatel.co.uk (freedesktop at priatel.co.uk) wrote:

> Perhaps I'm missing something, but that's still not doing what I expect.
>
> Here's what I have...
>
> #----- /etc/systemd/system/first.target -----#
> [Unit]
> Description=Started first
> Wants=third.service
>
> #----- /etc/systemd/system/second.target -----#
> [Unit]
> Description=Started second
> Wants=third.service
>
> #----- /etc/systemd/system/third.service -----#
> [Unit]
> Description=Third service
> Requisite=first.target second.target

Add "After=first.target second.target" here as well. Ordering and
requirement deps are orthogonal in systemd. See documentation.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list