diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2015-10-09 12:37:50 +0000 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2015-10-09 12:37:50 +0000 |
commit | de53c4174886898410fdce7eb7551a6a1ed19655 (patch) | |
tree | 434ef503bcfd73b069987374428653c921891993 /src/core/dbus-execute.c | |
parent | 047d99337f2e32cf6fc88bf415d4a3ed2a286539 (diff) |
systemd-run can now launch units with SyslogIdentifier
Diffstat (limited to 'src/core/dbus-execute.c')
-rw-r--r-- | src/core/dbus-execute.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index f902fd6f2d..030df55554 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -856,7 +856,32 @@ int bus_exec_context_set_transient_property( } return 1; + } else if (streq(name, "SyslogIdentifier")) { + const char *id; + + r = sd_bus_message_read(message, "s", &id); + if (r < 0) + return r; + + if (mode != UNIT_CHECK) { + + if (isempty(id)) { + c->syslog_identifier = mfree(c->syslog_identifier); + } else { + char *t; + t = strdup(id); + if (!t) + return -ENOMEM; + + free(c->syslog_identifier); + c->syslog_identifier = t; + } + + unit_write_drop_in_private_format(u, mode, name, "SyslogIdentifier=%s\n", id); + } + + return 1; } else if (streq(name, "Nice")) { int n; |