From: Lennart Poettering Date: Wed, 16 Nov 2016 13:31:03 +0000 (+0100) Subject: systemctl: add env var to force connection to system manager via the bus X-Git-Tag: v233~415^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4015567adf77d4b992dc6fae84445e4e09c236e;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 49a97ff268d..de7e19725c7 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -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;