Linux bluetooth development
 help / color / mirror / Atom feed
From: Alex Elsayed <eternaleye@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Alex Elsayed <eternaleye@gmail.com>
Subject: [PATCH v4] Add dbus service file that references the systemd unit
Date: Thu, 17 May 2012 10:00:27 -0700	[thread overview]
Message-ID: <8a401753379e62beba65d277ad3d360280386463.1337273908.git.eternaleye@gmail.com> (raw)
In-Reply-To: <3754404.7KqlubBV4t@arkadios>

This allows bluez to be bus-activated.
---
v4: Drop Exec= from dbus service (only systemd activation supported)
v3: Use alias as SystemdService so 'systemctl enable/disable' works
v2: Fix whitespace error

 Makefile.am              |    2 ++
 src/bluetooth.service.in |    1 +
 src/org.bluez.service    |    5 +++++
 3 files changed, 8 insertions(+)
 create mode 100644 src/org.bluez.service

diff --git a/Makefile.am b/Makefile.am
index 44e82c0..82df92e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,8 +27,10 @@ include_HEADERS =
 
 if DATAFILES
 dbusdir = $(sysconfdir)/dbus-1/system.d
+dbusservicedir = $(datadir)/dbus-1/system-services
 
 dbus_DATA = src/bluetooth.conf
+dbusservice_DATA = src/org.bluez.service
 
 confdir = $(sysconfdir)/bluetooth
 
diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in
index 8a9edb6..2a576a3 100644
--- a/src/bluetooth.service.in
+++ b/src/bluetooth.service.in
@@ -8,3 +8,4 @@ ExecStart=@prefix@/sbin/bluetoothd -n
 
 [Install]
 WantedBy=bluetooth.target
+Alias=dbus-org.bluez.service
diff --git a/src/org.bluez.service b/src/org.bluez.service
new file mode 100644
index 0000000..dd7ae8f
--- /dev/null
+++ b/src/org.bluez.service
@@ -0,0 +1,5 @@
+[D-BUS Service]
+Name=org.bluez
+Exec=/bin/false
+User=root
+SystemdService=dbus-org.bluez.service
-- 
1.7.10.2


       reply	other threads:[~2012-05-17 17:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3754404.7KqlubBV4t@arkadios>
2012-05-17 17:00 ` Alex Elsayed [this message]
2012-05-17 17:52   ` [PATCH v4] Add dbus service file that references the systemd unit Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a401753379e62beba65d277ad3d360280386463.1337273908.git.eternaleye@gmail.com \
    --to=eternaleye@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox