[systemd-devel] Require a systemd.unit to finish completely before other services(units) are started
Mantas Mikulėnas
grawity at gmail.com
Tue Apr 26 07:01:17 UTC 2016
On Tue, Apr 26, 2016 at 9:27 AM, george Karakou <mad-proffessor at hotmail.com>
wrote:
> Hi list, how are you all? I hope everyone is doing well.
> I have a long starting unit that executes some(many actually) scripts and
> with the parallel nature of systemd init process it doesn't fully start up
> before some other units i have starting after it. Meaning "After="
> directives in [Unit] section don't fully fill my needs here.
>
No, that's *exactly* the case for After= directives. To disable
parallelization for some parts of the boot process, you use Before= and
After= – that's it.
That said, if After=foo.service doesn't work properly, it usually means
foo.service is lying to systemd about when it has "finished starting". If
that's the case, you'd have exactly the same problems no matter what kind
of serialization you try to enable.
If your megascript starts multiple daemons, then maybe it should be split
into several independent .service units, one for each daemon? If that's not
acceptable, try changing it to Type=notify, and make it use `systemd-notify
READY=1` once it's done.
--
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160426/69a79405/attachment.html>
More information about the systemd-devel
mailing list