systemd-run: can launch units with SyslogFacility

This commit is contained in:
Evgeny Vereshchagin
2015-10-14 15:05:04 +00:00
parent 7135129e0a
commit 460ed929cf
2 changed files with 24 additions and 0 deletions
+13
View File
@@ -893,6 +893,19 @@ int bus_exec_context_set_transient_property(
unit_write_drop_in_private_format(u, mode, name, "SyslogLevel=%i\n", level);
}
return 1;
} else if (streq(name, "SyslogFacility")) {
int facility;
r = sd_bus_message_read(message, "i", &facility);
if (r < 0)
return r;
if (mode != UNIT_CHECK) {
c->syslog_priority = (facility << 3) | LOG_PRI(c->syslog_priority);
unit_write_drop_in_private_format(u, mode, name, "SyslogFacility=%i\n", facility);
}
return 1;
} else if (streq(name, "Nice")) {
int n;