summaryrefslogtreecommitdiff
path: root/src/basic/unit-def.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-06-25 11:31:28 +0200
committerLennart Poettering <lennart@poettering.net>2019-07-11 12:18:51 +0200
commit380dc8b0a25f544269fdff7d9fd0e488fb374031 (patch)
tree8272684786fb0df16e30f2ad07b57b972ddddfb1 /src/basic/unit-def.h
parentc0228b4fa3e4e633afa5eb8417e6cd3e311cd250 (diff)
downloadsystemd-380dc8b0a25f544269fdff7d9fd0e488fb374031.tar.gz
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).
Diffstat (limited to 'src/basic/unit-def.h')
-rw-r--r--src/basic/unit-def.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/unit-def.h b/src/basic/unit-def.h
index 85f3e42d30..b3e111da3f 100644
--- a/src/basic/unit-def.h
+++ b/src/basic/unit-def.h
@@ -40,6 +40,7 @@ typedef enum UnitActiveState {
UNIT_FAILED,
UNIT_ACTIVATING,
UNIT_DEACTIVATING,
+ UNIT_MAINTENANCE,
_UNIT_ACTIVE_STATE_MAX,
_UNIT_ACTIVE_STATE_INVALID = -1
} UnitActiveState;