meta-digi/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/bluetooth.service-add-custo...

38 lines
1.1 KiB
Diff

From: Gabriel Valcazar <gabriel.valcazar@digi.com>
Date: Thu, 7 Feb 2019 13:15:43 +0100
Subject: [PATCH] bluetooth.service: add Digi customizations
These changes include:
* Adding the bluetooth-init service as a dependency
* Changing the path condition so the service only starts on bluetooth-capable
boards
* Changing the service's target so it starts on boot
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
---
src/bluetooth.service.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in
index f799f65..ced1055 100644
--- a/src/bluetooth.service.in
+++ b/src/bluetooth.service.in
@@ -1,7 +1,9 @@
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
-ConditionPathIsDirectory=/sys/class/bluetooth
+ConditionPathIsDirectory=/proc/device-tree/bluetooth
+Requires=bluetooth-init.service
+After=bluetooth-init.service
[Service]
Type=dbus
@@ -16,5 +18,5 @@ ProtectHome=true
ProtectSystem=full
[Install]
-WantedBy=bluetooth.target
+WantedBy=multi-user.target
Alias=dbus-org.bluez.service