On Mon, 01.12.14 17:10, Nekrasov, Alexander (alexander.nekra...@emc.com) wrote:
> Hello, > > While converting from Upstart to SystemD, came upon this issue. Is this case > not covered or am I missing something? > > In Upstart, I can start a job when another job fails, and there's a $JOB > variable that tells me what was the job that failed. > > start on (stopped RESULT=failed PROCESS=post-stop) > > script > echo "this just failed: $JOB" > end script > > In SystemD I can register a unit to be started when another unit > fails. But there seems to be no way of knowing what unit failed. Is > that correct? The idea is that you use "OnFailure=myfailureunit@%n.service". %n is automatically replaced by the name of the unit you place this in. Then, in the failure unit you can identify the instance again with %i or %I. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel