summaryrefslogtreecommitdiff
path: root/src/shared/unit-name.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-06-28 04:12:58 +0200
committerLennart Poettering <lennart@poettering.net>2013-06-28 04:12:58 +0200
commitc2756a68401102786be343712c0c35acbd73d28d (patch)
tree64af93633ce57982937323c9a55fe1ecbf076cd1 /src/shared/unit-name.c
parent1508e85878cff23a220b2ff8d6c71418e19797de (diff)
core: add transient units
Transient units can be created via the bus API. They are configured via the method call parameters rather than on-disk files. They are subject to normal GC. Transient units currently may only be created for services (however, we will extend this), and currently only ExecStart= and the cgroup parameters can be configured (also to be extended). Transient units require a unique name, that previously had no configuration file on disk. A tool systemd-run is added that makes use of this functionality to run arbitrary command lines as transient services: $ systemd-run /bin/ping www.heise.de Will cause systemd to create a new transient service and run ping in it.
Diffstat (limited to 'src/shared/unit-name.c')
-rw-r--r--src/shared/unit-name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c
index 0910e86f10..bf1ab794a8 100644
--- a/src/shared/unit-name.c
+++ b/src/shared/unit-name.c
@@ -52,6 +52,7 @@ DEFINE_STRING_TABLE_LOOKUP(unit_type, UnitType);
static const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = {
[UNIT_STUB] = "stub",
[UNIT_LOADED] = "loaded",
+ [UNIT_NOT_FOUND] = "not-found",
[UNIT_ERROR] = "error",
[UNIT_MERGED] = "merged",
[UNIT_MASKED] = "masked"
@@ -403,7 +404,6 @@ char *unit_name_template(const char *f) {
strcpy(mempcpy(r, f, a), e);
return r;
-
}
char *unit_name_from_path(const char *path, const char *suffix) {