[PATCH BlueZ v2 10/10] Allow using obexd without systemd in the user session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@xxxxxxxxxxxxxxxx>

Not all sessions run systemd --user and in some cases one may be missing
systemd all together.

Provide the correct path instead of /bin/false, allowing dbus to start
the service in such cases.

DBUS implementations can ignore the Exec line all together when run in
systemd aware mode - at least the OG dbus does that. So ultimately this
change is a no-op for the systemd --user case.

On my system, this is literally the only non-system service which uses
/bin/false.

[Emil Velikov]
Port to AC_CONFIG_FILES() .in files handling. Reword commit message.
---
 Makefile.obexd                                                  | 4 +---
 configure.ac                                                    | 1 +
 obexd/src/{org.bluez.obex.service => org.bluez.obex.service.in} | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Makefile.obexd b/Makefile.obexd
index 1d37a1bd4..d88708e66 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
@@ -8,12 +8,10 @@ install-data-hook:
 
 uninstall-hook:
 	rm -f $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
+endif
 
 dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
 dbussessionbus_DATA = obexd/src/org.bluez.obex.service
-endif
-
-EXTRA_DIST += obexd/src/org.bluez.obex.service
 
 if OBEX
 
diff --git a/configure.ac b/configure.ac
index 387db8c7d..c66991a3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -457,6 +457,7 @@ AC_CONFIG_FILES(
 	mesh/bluetooth-meshd.rst
 	mesh/bluetooth-mesh.service
 	obexd/src/obex.service
+	obexd/src/org.bluez.obex.service
 	src/bluetoothd.rst
 	src/bluetooth.service
 	tools/bluetooth-logger.service
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service.in
similarity index 69%
rename from obexd/src/org.bluez.obex.service
rename to obexd/src/org.bluez.obex.service.in
index a53808884..14c16d3e3 100644
--- a/obexd/src/org.bluez.obex.service
+++ b/obexd/src/org.bluez.obex.service.in
@@ -1,4 +1,4 @@
 [D-BUS Service]
 Name=org.bluez.obex
-Exec=/bin/false
+Exec=@exec_prefix@/bluetooth/obexd
 SystemdService=dbus-org.bluez.obex.service

-- 
2.43.0





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux