summaryrefslogtreecommitdiff
path: root/src/shared/path-lookup.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-06 21:02:36 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:31 +0200
commit80b1ae32e1cab924086bb5224cde675df623df07 (patch)
tree0c9c2077a08a1b75ae73bd80b052d0f19d3d7d71 /src/shared/path-lookup.h
parent9183df707bde9e83d838e7b5a05db0c5f4b55e6d (diff)
core: introduce a "control" unit file directory
This patch adds a concept of a "control" unit file directory, which is supposed to be used as place for unit file drop-ins created by "systemctl set-property" (note that this directory is not actually hooked up to "systemctl set-property" yet, that's coming in a later patch). The rationale for this: previously changes made by the user and by "systemctl set-property" were done in the same directory, which made semantics very unclear: the changes made by "systemctl set-property" were applied instantly, and their drop-ins only written to not lose settings on a later "systemctl daemon-reload", while drop-ins made by the user would only be in effect after "systemctl daemon-reload". This is particular problematic as the changes made by "systemctl set-property" would really apply immediately without any respect for the unit search path. This meant that using "set-property" could have an effect that is lsot as soon as "daemon-reload" is issued, in case there was a "later" drop-in already in place. With this change the directories are seperated, and the "control" directory always takes the highest priority of all, to avoid any confusion.
Diffstat (limited to 'src/shared/path-lookup.h')
-rw-r--r--src/shared/path-lookup.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h
index 29f74cf211..89254cbac5 100644
--- a/src/shared/path-lookup.h
+++ b/src/shared/path-lookup.h
@@ -27,20 +27,33 @@ typedef struct LookupPaths LookupPaths;
#include "macro.h"
struct LookupPaths {
+ /* Where we look for unit files. This includes the individual special paths below, but also any vendor
+ * supplied, static unit file paths. */
char **search_path;
- /* Where we shall create or remove our installation symlinks, aka "configuration". */
+ /* Where we shall create or remove our installation symlinks, aka "configuration", and where the user/admin
+ * shall place his own unit files. */
char *persistent_config;
char *runtime_config;
- /* Where to place generated unit files */
+ /* Where to place generated unit files (i.e. those a "generator" tool generated). Note the special semantics of
+ * this directory: the generators are flushed each time a "systemctl daemon-reload" is issued. The user should
+ * not alter these directories directly. */
char *generator;
char *generator_early;
char *generator_late;
- /* Where to place transient unit files */
+ /* Where to place transient unit files (i.e. those created dynamically via the bus API). Note the special
+ * semantics of this directory: all units created transiently have their unit files removed as the transient
+ * unit is unloaded. The user should not alter this directory directly. */
char *transient;
+ /* Where the snippets created by "systemctl set-property" are placed. Note that for transient units, the
+ * snippets are placed in the transient directory though (see above). The user should not alter this directory
+ * directly. */
+ char *persistent_control;
+ char *runtime_control;
+
/* The root directory prepended to all items above, or NULL */
char *root_dir;
};