summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2018-04-30 18:21:27 +0200
committerLennart Poettering <lennart@poettering.net>2018-04-30 18:21:27 +0200
commit2955e0d4dcd670651a55c9372e45b5183f602041 (patch)
tree35b72ab1763867901b899eca1ea93c6f3b79e559 /src/systemctl
parent2ff04e5b7f8d16c659452580a6886a3fae65da8b (diff)
downloadsystemd-2955e0d4dcd670651a55c9372e45b5183f602041.tar.gz
systemctl: make sure legacy "reboot", "suspend" and friends are always asynchronous (#8848)
Currently, "reboot" behaves differently in setups with and without logind. If logind is used (which is probably the more common case) the operation is asynchronous, we should behave in the same way as "systemctl <verb>". Let's clean this up, and always expose the same behaviour, regardless if logind is used or not: let's always make it asynchronous. See: #6479 Fixes: commit 130246d2e8d7a0c91dbaa1110fa7a6d6e6f86a50
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index c6342243f8..49395ce02c 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -8466,6 +8466,11 @@ static int halt_main(void) {
}
}
+ /* In order to minimize the difference between operation with and
+ * without logind, we explicitly enable non-blocking mode for this,
+ * as logind's shutdown operations are always non-blocking. */
+ arg_no_block = true;
+
if (!arg_dry_run && !arg_force)
return start_with_fallback();