bus-util: print a friendly message when PID1 is not systemd

Follow-up for 861f16d267.

Fixes #8913.
This commit is contained in:
Yu Watanabe
2018-05-09 17:07:37 +09:00
parent f7e2933677
commit fb507898a3
3 changed files with 20 additions and 12 deletions
-6
View File
@@ -211,12 +211,6 @@ static int acquire_bus(BusFocus focus, sd_bus **ret) {
user = arg_scope != UNIT_FILE_SYSTEM;
if (!user && sd_booted() <= 0) {
/* Print a friendly message when the local system is actually not running systemd as PID 1. */
log_error("System has not been booted with systemd as init system (PID 1). Can't operate.");
return -EHOSTDOWN;
}
if (focus == BUS_MANAGER)
r = bus_connect_transport_systemd(arg_transport, arg_host, user, &busses[focus]);
else