summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-11-16 14:31:03 +0100
committerLennart Poettering <lennart@poettering.net>2016-11-16 15:03:26 +0100
commitd4015567adf77d4b992dc6fae84445e4e09c236e (patch)
treecae237a34d2f793a53570d4ef0b9e20461db3d4c /src/systemctl
parentc5a97ed132b400ad82f7939d55fe1027a2b13f6e (diff)
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.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 49a97ff268..de7e19725c 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;