summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-07-26 16:09:25 +0200
committerLennart Poettering <lennart@poettering.net>2013-07-26 16:09:25 +0200
commit6577c7cea72f19185ad999c223bcf663c010dc6f (patch)
treec4343b08c74bbcffae599a31736a3766acd6f7f7 /src/core
parent39bdfa31f2f00c3357e2a7a5f139abee6d7c7cd3 (diff)
core: allow setting RemainAfterExit= for transient services
Diffstat (limited to 'src/core')
-rw-r--r--src/core/dbus-service.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c
index 8b157b5f3c..1a44e1fd1b 100644
--- a/src/core/dbus-service.c
+++ b/src/core/dbus-service.c
@@ -180,7 +180,22 @@ static int bus_service_set_transient_property(
assert(s);
assert(i);
- if (streq(name, "ExecStart")) {
+ if (streq(name, "RemainAfterExit")) {
+ if (dbus_message_iter_get_arg_type(i) != DBUS_TYPE_BOOLEAN)
+ return -EINVAL;
+
+ if (mode != UNIT_CHECK) {
+ dbus_bool_t b;
+
+ dbus_message_iter_get_basic(i, &b);
+
+ s->remain_after_exit = b;
+ unit_write_drop_in_private_format(UNIT(s), mode, name, "RemainAfterExit=%s\n", yes_no(b));
+ }
+
+ return 1;
+
+ } else if (streq(name, "ExecStart")) {
DBusMessageIter sub;
unsigned n = 0;