When systemd is requested to start a service with unsatisfied conditions, it will report that the service was started successfully but in reality the service was never started. This causes the client trying to call a method on a DBus-activated service to hang or timeout instead of receiving an error.
This PR fix this by checking for the ConditionResult property on the service unit object and fail activation if it's false.
How to reproduce:
Get a Fedora Workstation 35 machine with no Bluetooth (or a VM)
When systemd is requested to start a service with unsatisfied conditions, it will report that the service was started successfully but in reality the service was never started. This causes the client trying to call a method on a DBus-activated service to hang or timeout instead of receiving an error.
This PR fix this by checking for the
ConditionResult
property on the service unit object and fail activation if it'sfalse
.How to reproduce:
busctl call org.bluez / org.freedesktop.DBus.Peer Ping
Expected result:
Call failed: Could not activate remote peer.
Actual result: The command times out.
Fixes #276