summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-22 14:04:38 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-22 14:04:38 -0400
commit86ec5e5e29295fb2594a7899e86cda9644b98b9a (patch)
tree2107481a9703edf9094b6652d556879b983c11e1
parent9ba37525d0ef3d144a50ed5fd4710573e92b7ec1 (diff)
parent37e605f934892bf7458eecaeb01fc682e33cc2ad (diff)
downloadsystemd-86ec5e5e29295fb2594a7899e86cda9644b98b9a.tar.gz
Merge pull request #3094 from poettering/run-slice
systemd-run: fix --slice= in conjunction with --scope
-rw-r--r--src/core/dbus-unit.c5
-rw-r--r--src/machine/machinectl.c4
-rw-r--r--src/run/run.c4
3 files changed, 10 insertions, 3 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index ed207f15b9..5c9d32438c 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -1242,7 +1242,10 @@ static int bus_unit_set_transient_property(
if (!unit_name_is_valid(s, UNIT_NAME_PLAIN))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid unit name '%s'", s);
- r = manager_load_unit(u->manager, s, NULL, error, &slice);
+ /* Note that we do not dispatch the load queue here yet, as we don't want our own transient unit to be
+ * loaded while we are still setting it up. Or in other words, we use manager_load_unit_prepare()
+ * instead of manager_load_unit() on purpose, here. */
+ r = manager_load_unit_prepare(u->manager, s, NULL, error, &slice);
if (r < 0)
return r;
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 7b1ede7116..1ce23f1c1d 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -2449,8 +2449,8 @@ static int help(int argc, char *argv[], void *userdata) {
" rename NAME NAME Rename an image\n"
" read-only NAME [BOOL] Mark or unmark image read-only\n"
" remove NAME... Remove an image\n"
- " set-limit [NAME] BYTES Set image or pool size limit (disk quota)\n\n"
- " clean Remove hidden (or all) images\n"
+ " set-limit [NAME] BYTES Set image or pool size limit (disk quota)\n"
+ " clean Remove hidden (or all) images\n\n"
"Image Transfer Commands:\n"
" pull-tar URL [NAME] Download a TAR container image\n"
" pull-raw URL [NAME] Download a RAW container or VM image\n"
diff --git a/src/run/run.c b/src/run/run.c
index 4a0143d4e6..1d0f74ad21 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -621,6 +621,10 @@ static int transient_scope_set_properties(sd_bus_message *m) {
if (r < 0)
return r;
+ r = transient_cgroup_set_properties(m);
+ if (r < 0)
+ return r;
+
r = sd_bus_message_append(m, "(sv)", "PIDs", "au", 1, (uint32_t) getpid());
if (r < 0)
return r;