]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/manager.h
core: implement Uphold= dependency type
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Apr 2021 13:24:08 +0000 (15:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 May 2021 14:03:03 +0000 (16:03 +0200)
commit0bc488c99ab2ed3464237607e381f4d72cd321d5
tree5dfbbe4572ec4a3d945b3b4b50369e78a3c62a64
parent294446dcb98eaa1ced5839da674c2065b1367a3a
core: implement Uphold= dependency type

This is like a really strong version of Wants=, that keeps starting the
specified unit if it is ever found inactive.

This is an alternative to Restart= inside a unit, acknowledging the fact
that whether to keep restarting the unit is sometimes not a property of
the unit itself but the state of the system.

This implements a part of what #4263 requests. i.e. there's no
distinction between "always" and "opportunistic". We just dumbly
implement "always" and become active whenever we see no job queued for
an inactive unit that is supposed to be upheld.
12 files changed:
man/systemd.unit.xml
src/basic/unit-def.c
src/basic/unit-def.h
src/core/dbus-unit.c
src/core/load-fragment-gperf.gperf.in
src/core/manager.c
src/core/manager.h
src/core/unit-dependency-atom.c
src/core/unit-dependency-atom.h
src/core/unit.c
src/core/unit.h
test/fuzz/fuzz-unit-file/directives.service