From b16b19885c5383cd0499503617b98ceb188c898e Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 12 Feb 2024 20:02:46 +0000 Subject: [PATCH] Allow using obexd without systemd in the user session 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. --- Makefile.obexd | 4 +--- configure.ac | 1 + .../src/{org.bluez.obex.service => org.bluez.obex.service.in} | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) rename obexd/src/{org.bluez.obex.service => org.bluez.obex.service.in} (69%) diff --git a/Makefile.obexd b/Makefile.obexd index 0e50b1fa4..81456544d 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 5eb7ee0e0..05c76dddb 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.47.3