mirror of
https://github.com/troglobit/finit.git
synced 2026-10-21 11:29:42 +00:00
plugin: start a system bus by default
Finit speaks D-Bus itself now and claims org.finit on the system bus when it finds one, but nothing in a default build ever brings that bus up. The plugin that does was opt-in, so the built-in support sat idle unless the integrator knew to ask for both halves. Defaulting it on is only reasonable if the result stays the admin's to change, and a service registered from C through conf_save_service() is not: it lands in the run path where it cannot be overridden or emptied out. So the daemon moves to 20-dbus.conf and its directories to tmpfiles.d/dbus.conf, the same way hotplug and every other daemon we ship them for. The plugin keeps only what has to look at the running system, the stale pidfile and the machine UUID. Those directories are no longer chowned to messagebus. tmpfiles.d skips a line whose user does not exist rather than falling back, so the plugin's messagebus/dbus/root ladder has no equivalent there, and dbus-daemon binds its socket before dropping privileges anyway. The plugin already bows out where there is no dbus-daemon installed, so systems that never wanted a bus are unaffected, and --disable-dbus-plugin is there for those that have one and would still rather init left it alone. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
9875e76419
commit
2e0b1d6f8b
9 files changed
+61
-72
No files matched your search
@@ -8,6 +8,14 @@ All relevant changes are documented in this file.
|
||||
|
||||
### Changes
|
||||
|
||||
- The `dbus.so` plugin, which starts an external `dbus-daemon`, is now
|
||||
enabled by default. It does nothing on systems without a
|
||||
`dbus-daemon` installed, and `--disable-dbus-plugin` opts out. The
|
||||
daemon it used to register from C now lives in `20-dbus.conf`, and
|
||||
the directories it needs in `tmpfiles.d/dbus.conf`, so both can be
|
||||
overridden from `/etc` like any other system file. Those
|
||||
directories are no longer chowned to `messagebus`, matching how
|
||||
Finit ships directories for other daemons
|
||||
- The `tty` block takes `passenv`, which the line-based format has had
|
||||
since v4.4 (issue #286) and the block format was missing
|
||||
- New `provides` setting for run/task/service/sysv blocks, naming
|
||||
|
||||
+7
-5
@@ -53,14 +53,16 @@ Below are a few of the main switches to configure:
|
||||
|
||||
* `--disable-dbus`: Opt out of Finit's built-in D-Bus support, enabled by
|
||||
default. See [D-Bus Integration](dbus.md) for what it provides. Not to
|
||||
be confused with `--enable-dbus-plugin` below, which only starts an
|
||||
external `dbus-daemon`
|
||||
be confused with `--disable-dbus-plugin` below, which only governs
|
||||
starting an external `dbus-daemon`
|
||||
|
||||
* `--enable-alsa-utils-plugin`: Enable the optional `alsa-utils.so` sound plugin.
|
||||
|
||||
* `--enable-dbus-plugin`: Enable the optional D-Bus `dbus.so` plugin, which
|
||||
launches `dbus-daemon` at boot. Unrelated to the built-in bus, see
|
||||
`--disable-dbus` above.
|
||||
* `--disable-dbus-plugin`: Drop the `dbus.so` plugin, which launches
|
||||
`dbus-daemon` at boot. Enabled by default; the plugin does nothing on
|
||||
a system that has no `dbus-daemon` installed, so opting out is only
|
||||
needed to keep init from starting a bus on a system that has one.
|
||||
Unrelated to the built-in bus, see `--disable-dbus` above.
|
||||
|
||||
* `--enable-resolvconf-plugin`: Enable the `resolvconf.so` optional plugin.
|
||||
|
||||
|
||||
+4
-1
@@ -35,7 +35,10 @@ For your convenience a set of *optional* plugins are available:
|
||||
> the `/etc/fstab` file and in the Linux kernel config.
|
||||
|
||||
* *dbus.so*: Setup and start system message bus, D-Bus, at boot.
|
||||
_Optional plugin._
|
||||
Enabled by default, and a no-op on systems without a `dbus-daemon`.
|
||||
The daemon is declared in `20-dbus.conf` and its directories in
|
||||
`tmpfiles.d/dbus.conf`, both overridable from `/etc`; the plugin
|
||||
itself only handles what has to inspect the running system.
|
||||
|
||||
* *hook-scripts.so*: Trigger the execution of scripts from plugin hook
|
||||
points (see [Hooks](#hooks)). _Optional plugin._
|
||||
|
||||
Reference in new issue
Block a user