On Wednesday 02 July 2014 at 18:04:36, Mantas Mikulėnas wrote: > On Wed, Jul 2, 2014 at 4:05 PM, Ivan Shapovalov <[email protected]> wrote: > > Consider the following situation. > > We have foo.target and [email protected]. All instances of [email protected] are > > WantedBy=foo.target (and implicitly After=foo.target). So, when foo.target > > is activated, all instances of [email protected] 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.
That's a good idea. I'll use wrapper+flock, thanks. /* The templated unit invokes `bup index` on a given path (bup is a tool for doing incremental backups). Running multiple instances of `bup index` is bogus, as they will end up overwriting the index file. */ -- Ivan Shapovalov / intelfx /
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
