]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: introduce SuccessAction= as unit file property
authorLennart Poettering <lennart@poettering.net>
Thu, 16 Nov 2017 14:18:01 +0000 (15:18 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 20 Nov 2017 15:37:22 +0000 (16:37 +0100)
commite7dfbb4e7414fdea57fd0ff7ad20585295b6e1b0
tree6e79ed4ee53860fd317a30f862867f5cd67a1e6c
parent53c35a766f93e9aee79a8dbf44443d3040fbde14
core: introduce SuccessAction= as unit file property

SuccessAction= is similar to FailureAction= but declares what to do on
success of a unit, rather than on failure. This is useful for running
commands in qemu/nspawn images, that shall power down on completion. We
frequently see "ExecStopPost=/usr/bin/systemctl poweroff" or so in unit
files like this. Offer a simple, more declarative alternative for this.

While we are at it, hook up failure action with unit_dump() and
transient units too.
man/systemd.unit.xml
src/core/dbus-unit.c
src/core/load-fragment-gperf.gperf.m4
src/core/unit.c
src/core/unit.h
src/shared/bus-unit-util.c