mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
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
This commit is contained in:
parent
2ff04e5b7f
commit
2955e0d4dc
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user