[systemd-devel] No error even a Required= service does not exist
Jörg Weinhardt
jw at ib-weinhardt.de
Mon Nov 25 16:51:40 UTC 2019
> Mantas Mikulėnas <grawity at gmail.com> hat am 25. November 2019 um 14:19 geschrieben:
>
>
> On Mon, Nov 25, 2019 at 3:13 PM Jörg Weinhardt <jw at ib-weinhardt.de> wrote:
>
> > Hi,
> >
> > the behavior of systemd is not quite clear to me:
> > I have a service which requires another service to be started and running,
> > so I use a Requires= dependency to the required service.
> > But if the required service does not exist at all, there is no error
> > message from systemd.
> > e.g.
> >
> > Requires=xyz.service
> >
> > produces no complaint and starts the service even if there is no
> > xyz.service
> > Is this the normal behavior or can I configure systemd to throw an error
> > in this case?
> >
>
> The docs say you can get this behavior if you also have After=xyz.service.
> (Not entirely sure why.)
>
Thanks for the quick answer. Require= and After= together also accepts a non existing xyz.service. But as I read the docs I found the dependency "BindsTo=" which together with "After=" does the job.
Not so easy..
regards,
Joerg
More information about the systemd-devel
mailing list