systemctl: make sure "reboot", "suspend" and friends are always asynchronous
authorLennart Poettering <lennart@poettering.net>
Fri, 29 Sep 2017 14:07:11 +0000 (16:07 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 4 Oct 2017 18:56:24 +0000 (20:56 +0200)
commit130246d2e8d7a0c91dbaa1110fa7a6d6e6f86a50
treed50c7055a693c7562da7d1e50d4529c774f3ca9f
parent36b69c31312007f522a2a7ae5087ae90bd7867cc
systemctl: make sure "reboot", "suspend" and friends are always asynchronous

Currently, "systemctl reboot" behaves differently in setups with and
without logind. If logind is used (which is probably the more common
case) the operation is asynchronous, and otherwise synchronous (though
subject to --no-block in this case). Let's clean this up, and always
expose the same behaviour, regardless if logind is used or not: let's
always make it asynchronous.

It might make sense to add a "--block" mode in a future PR that makes
these operations synchronous, but this requires non-trivial work in
logind, and is outside of the scope of this change.

See: #6479
src/systemctl/systemctl.c