From 5bda1f47b3f4b91e55df2f5a773fc83d3e7bf4fd Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Apr 2016 17:14:30 +0200 Subject: machinectl: fix misplaced newline in --help output --- src/machine/machinectl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index c370ed57ec..c9d41268c6 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -2439,8 +2439,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" -- cgit v1.2.3-54-g00ecf From aea529e5b2c864d536941ee18220abcc1a9015a0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Apr 2016 17:30:08 +0200 Subject: core: don't dispatch load queue when setting Slice= for transient units Let's be more careful when setting up the Slice= property of transient units: let's use manager_load_unit_prepare() instead of manager_load_unit(), so that the load queue isn't dispatched right away, because our own transient unit is in it, and we don#t want to have it loaded until we finished initializing it. --- src/core/dbus-unit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index c507265070..1f0bc3a386 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -1099,7 +1099,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; -- cgit v1.2.3-54-g00ecf From 37e605f934892bf7458eecaeb01fc682e33cc2ad Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Apr 2016 17:31:40 +0200 Subject: run: make --slice= work in conjunction with --scope Fixes: #2991 --- src/run/run.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/run/run.c b/src/run/run.c index 1993a424ca..ff94ac7b11 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -620,6 +620,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; -- cgit v1.2.3-54-g00ecf