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 15:03:26 +01:00
parent c5a97ed132
commit d4015567ad
+3
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;