1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-06 12:58:22 +03:00

systemctl: add env var to force connection to system manager via the bus

Sometimes it is useful for debugging purposes to force systemctl to connect to
PID 1 via the bus instead of direct connection, even if the direct connection
is possible.
This commit is contained in:
Lennart Poettering 2016-11-16 14:31:03 +01:00
parent c5a97ed132
commit d4015567ad

View File

@ -204,6 +204,9 @@ static int acquire_bus(BusFocus focus, sd_bus **ret) {
if (arg_transport != BUS_TRANSPORT_LOCAL)
focus = BUS_FULL;
if (getenv_bool("SYSTEMCTL_FORCE_BUS") > 0)
focus = BUS_FULL;
if (!busses[focus]) {
bool user;