[systemd-devel] reacting to unit failures (OnFailure)

Nekrasov, Alexander alexander.nekrasov at emc.com
Mon Dec 1 14:10:17 PST 2014


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?

Thanks,
Alexander


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141201/54022553/attachment.html>


More information about the systemd-devel mailing list