[systemd-commits] src/core src/libsystemd
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Feb 3 10:19:27 PST 2015
src/core/dbus-unit.c | 14 ++++++++++++++
src/libsystemd/sd-bus/bus-util.c | 3 +--
2 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit 261420ba2a20305ad271b6f5f380aa74c5c9dd50
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Feb 3 19:07:40 2015 +0100
core: open up DefaultDependencies= property for transient units
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index fe876b3..625d21a 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -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;
diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c
index bb08e38..c9d8713 100644
--- a/src/libsystemd/sd-bus/bus-util.c
+++ b/src/libsystemd/sd-bus/bus-util.c
@@ -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) {
More information about the systemd-commits
mailing list