[systemd-devel] serializing execution of units
Mantas Mikulėnas
grawity at gmail.com
Wed Jul 2 08:04:36 PDT 2014
On Wed, Jul 2, 2014 at 4:05 PM, Ivan Shapovalov <intelfx100 at gmail.com> wrote:
> Consider the following situation.
> We have foo.target and foo at .service. All instances of foo at .service are
> WantedBy=foo.target (and implicitly After=foo.target). So, when foo.target
> is activated, all instances of foo at .service are started in parallel.
>
> The question is -- how to run them sequentially?
You can't do this with systemd features (and I'm curious why this
would be needed in the first place). But the program itself, or a
wrapper script, could use flock() or the `flock` tool on a shared
lockfile to serialize startup.
--
Mantas Mikulėnas <grawity at gmail.com>
More information about the systemd-devel
mailing list