On 2015-07-07 at 13:04 -0400, Ernast Sevo wrote: > Apologies that was mistakenly sent. The example service is below. > > [Unit] > Before=local-fs.target > After=<some service> > DefaultDependencies=false > > [Service] > Type=oneshot > ExecStart=/usr/bin/xxx > RemainAfterExit=yes > > [Install] > WantedBy=local-fs.target > > The problem is I can see boot-up continue prior to this service doing > its job. I am not sure if I am missing > something but I haven't come across anything in the documentation > that > can help. The service finishes its job > later but something's that depend on it have already failed and have > not waited for it to finish doing what it is doing. > > Any thoughts as to what could be causing this?
Two questions. 1) Does the /usr/bin/xxx program fork? A fork will not be waited for; systemd will consider the unit "active" right when the initially started process exits. 2) Remember, in absence of ordering dependencies (Before=/After=) everything in systemd is started in parallel. Oneshot services are not an exception: they do not pause everything, they are just kept in "starting" state until the process exits. What exactly do you want to serialize against start-up of your service? Side-note: Most "common" services will get implicitly ordered after your service with a chain like this: xxx.service -> local-fs.target -> sysinit.target -> basic.target -> ... However, early-boot services (which have "DefaultDependencies=false" as well) will _not_ get ordered against your service in any way. HTHs, -- Ivan Shapovalov / intelfx /
signature.asc
Description: This is a digitally signed message part
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel