systemd-run can now launch units with SyslogIdentifier
This commit is contained in:
parent
047d99337f
commit
de53c41748
|
@ -856,7 +856,32 @@ int bus_exec_context_set_transient_property(
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
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")) {
|
} else if (streq(name, "Nice")) {
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
|
|
@ -1494,7 +1494,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
|
||||||
"UtmpIdentifier", "UtmpMode", "PAMName", "TTYPath",
|
"UtmpIdentifier", "UtmpMode", "PAMName", "TTYPath",
|
||||||
"StandardInput", "StandardOutput", "StandardError",
|
"StandardInput", "StandardOutput", "StandardError",
|
||||||
"Description", "Slice", "Type", "WorkingDirectory",
|
"Description", "Slice", "Type", "WorkingDirectory",
|
||||||
"RootDirectory"))
|
"RootDirectory", "SyslogIdentifier"))
|
||||||
r = sd_bus_message_append(m, "v", "s", eq);
|
r = sd_bus_message_append(m, "v", "s", eq);
|
||||||
|
|
||||||
else if (streq(field, "DeviceAllow")) {
|
else if (streq(field, "DeviceAllow")) {
|
||||||
|
|
Loading…
Reference in a new issue