Make D-Bus and udisks2 available early (#1291)

* Disable systemd-logind support for udisks2

Currently udisks2 uses systemd-logind to prevent the system from
rebooting or similar operations while udisks operations are ongoing.
Unfortunately this stops us from using udisks2 during early boot since
systemd-logind is not ready at this point. Make the dependency
configureable so we can opt-out of using systemd-logind.

* Make dbus.service/socket and udisks2.service/socket available early

Disable default dependencies. This avoids those services to be ordered
after sysinit.target, and makes them available before local-fs.target
is reached. All mounts like mnt-data.mount are ordered before
local-fs.target, so breaking this dependency allows to use D-Bus before
mounting local file systems.

This seems fine when using the system bus directly from /run (instead of
/var/run, which is anyway a symlink to /run normally). It seems that
udisks misses /var/lib/udisks2 but it seems not to be required for the
features used so far.
This commit is contained in:
Stefan Agner
2021-03-31 21:46:02 +02:00
committed by GitHub
parent 905aa21e8c
commit 82db02756c
6 changed files with 63 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
[Unit]
DefaultDependencies=no

View File

@@ -0,0 +1,2 @@
[Unit]
DefaultDependencies=no

View File

@@ -0,0 +1,5 @@
[Unit]
DefaultDependencies=no
[Service]
Environment="DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket"

View File

@@ -0,0 +1,2 @@
[Unit]
DefaultDependencies=no