]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.h
core: add generic "clean" operation to units
authorLennart Poettering <lennart@poettering.net>
Tue, 25 Jun 2019 09:31:28 +0000 (11:31 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Jul 2019 10:18:51 +0000 (12:18 +0200)
commit380dc8b0a25f544269fdff7d9fd0e488fb374031
tree8272684786fb0df16e30f2ad07b57b972ddddfb1
parentc0228b4fa3e4e633afa5eb8417e6cd3e311cd250
core: add generic "clean" operation to units

This adds basic infrastructure to implement a "clean" operation for unit
types. This "clean" operation is supposed to remove on-disk resources of
units, and is supposed to be used in a later commit to clean our
RuntimeDirectory=, StateDirectory= and so on of service units.

Later commits will open this up to the bus, and hook up service units
with this.

This also adds a new generic ActiveState called UNIT_MAINTENANCE. It's
supposed to cover all kinds of "maintainance" state of units.
Specifically, this is supposed to cover the "cleaning" operations later
added for service units which might take a bit of time. This high-level,
generic, abstract state is called UNIT_MAINTENANCE instead of the
more specific "UNIT_CLEANING", since I think this should be kept open
for different operations possibly later on that could be nicely subsumed
under this (for example, maybe a recursive chown()ing operation could be
covered by this, and similar).
src/basic/unit-def.c
src/basic/unit-def.h
src/core/execute.h
src/core/unit.c
src/core/unit.h