summaryrefslogtreecommitdiff
path: root/src/bluetooth.service.in
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-10-20 12:24:45 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2015-10-23 19:33:59 +0300
commit488fd81a0f9cb193a733ac03fba0a80c145868c9 (patch)
treedd3039b7b40ca7d5225f7a98524f0ff7d7667e18 /src/bluetooth.service.in
parent0e3af927b7558064380008471fdaae3a570c99bf (diff)
downloadbluez-488fd81a0f9cb193a733ac03fba0a80c145868c9.tar.gz
systemd: Check if bluetooth is supported in the kernel
When running a kernel without bluetooth support, bluetooth.service fails to start with bluetoothd[1640]: Failed to access management interface bluetoothd[1640]: Adapter handling initialization failed systemd[1]: bluetooth.service: Main process exited, code=exited, status=1/FAILURE systemd[1]: Failed to start Bluetooth service. This causes an unnecessary "degraded" state and more importantly breaks package installation when the bluez package auto-starts the daemon. Add a condition to only start the service if /sys/class/bluetooth exists. https://launchpad.net/bugs/1506774
Diffstat (limited to 'src/bluetooth.service.in')
-rw-r--r--src/bluetooth.service.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in
index 35e9457dc..83e4732d0 100644
--- a/src/bluetooth.service.in
+++ b/src/bluetooth.service.in
@@ -1,6 +1,7 @@
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
+ConditionPathIsDirectory=/sys/class/bluetooth
[Service]
Type=dbus