1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

core: open up DefaultDependencies= property for transient units

This commit is contained in:
Lennart Poettering 2015-02-03 19:07:40 +01:00
parent d69a7ceaed
commit 261420ba2a
2 changed files with 15 additions and 2 deletions

View File

@ -898,6 +898,20 @@ static int bus_unit_set_transient_property(
return 1;
} else if (streq(name, "DefaultDependencies")) {
int b;
r = sd_bus_message_read(message, "b", &b);
if (r < 0)
return r;
if (mode != UNIT_CHECK) {
u->default_dependencies = b;
unit_write_drop_in_format(u, mode, name, "[Unit]\nDefaultDependencies=%s\n", yes_no(b));
}
return 1;
} else if (streq(name, "Slice") && unit_get_cgroup_context(u)) {
const char *s;

View File

@ -1371,8 +1371,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
if (STR_IN_SET(field,
"CPUAccounting", "MemoryAccounting", "BlockIOAccounting",
"SendSIGHUP", "SendSIGKILL",
"WakeSystem")) {
"SendSIGHUP", "SendSIGKILL", "WakeSystem", "DefaultDependencies")) {
r = parse_boolean(eq);
if (r < 0) {