diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-11-16 14:44:04 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-11-16 15:03:26 +0100 |
commit | 289188ca7dcbb2a1193d06349b73e5d7f5473755 (patch) | |
tree | d776e5788439d4edb69d634c0f0cd4687e2a4e64 /src/shared | |
parent | d4015567adf77d4b992dc6fae84445e4e09c236e (diff) |
system-run: add support for configuring unit dependencies with --property=
Support on the server side has already been in place for quite some time, let's
also add support on the client side for this.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/bus-unit-util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index a7702602eb..388b391342 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -62,6 +62,7 @@ int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignment) { const char *eq, *field; + UnitDependency dep; int r, rl; assert(m); @@ -572,7 +573,9 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen flags = (~flags) & NAMESPACE_FLAGS_ALL; r = sd_bus_message_append(m, "v", "t", flags); - } else { + } else if ((dep = unit_dependency_from_string(field)) >= 0) + r = sd_bus_message_append(m, "v", "as", 1, eq); + else { log_error("Unknown assignment %s.", assignment); return -EINVAL; } |