[systemd-devel] systemctl start second.service first.service

林自均 johnlinp at gmail.com
Fri Jan 12 04:51:36 UTC 2018


Hi Andrei,

> If unit A can be started without unit B, why does it matter in which
order they are started?

Are you suggesting that After=/Before= must come with Requires= or similar?
I think this breaks the design of making ordering dependencies and
requirement dependencies orthogonal.

Take smbd.service and nmbd.service for example. smbd.service
specifies After=nmbd.service, but no requirement dependencies
on nmbd.service. It means that the 2 services can live without each other,
but when the two services are starting together, ordering matters.

John Lin

Andrei Borzenkov <arvidjaar at gmail.com> 於 2018年1月12日 週五 上午11:59寫道:

> 12.01.2018 03:47, 林自均 пишет:
> > How about adding an "--order" option to systemctl? With this option,
> > systemctl will sort those units by ordering dependencies before
> submitting
> > them.
>
> And why does it matter? If unit A can be started without unit B, why
> does it matter in which order they are started? If unit A can *not* be
> started without unit B, it must tell so using Requires or Requisite.
>
> What are you trying to achieve?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180112/a61276b0/attachment.html>


More information about the systemd-devel mailing list