From 8a0cd7c69c5df85924f3f065d0ef0f71d490e599 Mon Sep 17 00:00:00 2001
From: Matt Ranostay <matt.ranostay@konsulko.com>
Date: Tue, 20 Nov 2018 18:21:43 +0200
Subject: [PATCH] recipes-connectivity: bluez5: add dbus-org.bluez.obex.service
 symlink

To allow OBEX service to be requested by a user on demand there needs
to be a symlink /etc/systemd/user/dbus-org.bluez.obex.service to the
obex.service

Change-Id: If4b8a94790403cf7f8f2a53ce3365c5f8c9f3b2c
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
---
 meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend b/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend
index c5afa875f..9c49ad0e9 100644
--- a/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend
+++ b/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend
@@ -10,4 +10,9 @@ SRC_URI_append = "\
 
 do_install_append() {
     install -m 0644 ${WORKDIR}/bluetooth.conf ${D}${sysconfdir}/dbus-1/system.d/bluetooth.conf
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        mkdir -p ${D}/etc/systemd/user
+        ln -sf ${systemd_user_unitdir}/obex.service ${D}/etc/systemd/user/dbus-org.bluez.obex.service
+    fi
 }
-- 
2.16.6