systemctl: rework how we connect to busses

System Internals / systemd - Lennart Poettering [poettering.net] - 29 September 2015 14:55 UTC

Sometimes we have to connect to the system manager directly (early boot, initrd, late boot, ...), sometimes through the system bus (unprivileged, remote, logind, ...). Instead of guessing in advance, which kind of connection we require (and sometimes guessing incorrectly), let's make sure each time we need bus connection we request the right bus explicitly.

This way, we set up exactly the bus connections require, never guess incorrectly, and do so only immediately when necessary.

As effect this reworks avoid_bus() into install_client_side(), since that's all it determines now: whether to install unit files client-side or server-side (i.e. in PID 1).

4fbd719 systemctl: rework how we connect to busses
src/systemctl/systemctl.c | 627 ++++++++++++++++++++++++++++-----------------
1 file changed, 394 insertions(+), 233 deletions(-)

Upstream: github.com


  • Share