[PATCH 2/8] Add command-line option to allow init daemon to connect to D-Bus session bus.
James Hunt
james.hunt at ubuntu.com
Fri Jun 3 09:22:30 UTC 2011
Add D-Bus session support to initctl. Note this is required for both the
visualisation features unit tests and also for the init-checkconf script.
* Changelog: Updated.
* util/initctl.c:
- Added "--session" command-line option.
- dbus_bus_type_setter(): New function used by option parser to
distinguish system/session D-Bus bus type.
- system_bus variable now replaced by two others: use_dbus (boolean)
and dbus_bus_type.
- upstart_open(): Updated to handle multiple D-Bus bus types.
* util/man/initctl.8: Update for "--session" option.
* util/tests/test_initctl.c: Updated to make use of use_dbus and
dbus_bus_type rather than system_bus.
Add command-line option to use D-Bus session bus (for testing).
* init/control.c:
- Added new boolean use_session_bus.
- Updated comments.
- control_handle_bus_type(): New function to allow selection of
session bus via env var "UPSTART_USE_SESSION_BUS".
Also logs use of session bus if use_session_bus set.
- control_bus_open(): Now connects to either D-Bus system bus or
session bus.
* init/control.h: New define for USE_SESSION_BUS_ENV.
* init/main.c: Addition of "--session" command-line option.
* init/man/init.8: Update for new "--session" command-line option.
Code:
https://code.launchpad.net/~jamesodhunt/upstart/upstream-add-session-bus-support
Merge Proposal:
https://code.launchpad.net/~jamesodhunt/upstart/upstream-add-session-bus-support/+merge/63345
Regards,
James.
More information about the upstart-devel
mailing list