Description: hook up traditional dbus activation
 On systems using systemd dbus will use the SystemdServices= directive,
 but on non-systemd systems
 the so called "traditional dbus activation" method
 involves reading the Exec= directive.
 Setting that to /bin/false means this service is not relevant
 on non-systemd systems,
 but apparently there's an interest from users of such systems
 to use iwd (and possibly ead).
 Thus hook up the expansion of the paths
 in the Exec= directive of the dbus service files
 to allow the traditional dbus activation to start respective daemon.
Author: Andreas Henriksson <andreas@fatal.se>
Bug-Debian: https://bugs.debian.org/966518
Last-Update: 2021-11-30
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile.am
+++ b/Makefile.am
@@ -268,7 +268,7 @@
 endif
 
 if SYSTEMD_SERVICE
-src_iwd_DEPENDENCIES += src/iwd.service
+src_iwd_DEPENDENCIES += src/iwd.service src/net.connman.iwd.service
 
 systemd_unit_DATA += src/iwd.service
 dbus_bus_DATA += src/net.connman.iwd.service
@@ -354,7 +354,7 @@
 endif
 
 if SYSTEMD_SERVICE
-wired_ead_DEPENDENCIES += wired/ead.service
+wired_ead_DEPENDENCIES += wired/ead.service wired/net.connman.ead.service
 
 systemd_unit_DATA += wired/ead.service
 dbus_bus_DATA += wired/net.connman.ead.service
@@ -575,8 +575,8 @@
 
 TESTS = $(unit_tests)
 
-EXTRA_DIST = src/genbuiltin src/iwd.service.in src/net.connman.iwd.service \
-			wired/ead.service.in wired/net.connman.ead.service \
+EXTRA_DIST = src/genbuiltin src/iwd.service.in src/net.connman.iwd.service.in \
+			wired/ead.service.in wired/net.connman.ead.service.in \
 			src/80-iwd.link src/pkcs8.conf unit/gencerts.cnf \
 			doc/main.conf \
 			$(manual_pages) $(patsubst %.1,%.rst, \
@@ -592,7 +592,8 @@
 AM_CFLAGS += -DHAVE_PKCS8_SUPPORT
 endif
 
-CLEANFILES = src/iwd.service wired/ead.service
+CLEANFILES = src/iwd.service wired/ead.service \
+		src/net.connman.iwd.service wired/net.connman.ead.service
 
 DISTCHECK_CONFIGURE_FLAGS = --disable-dbus-policy --disable-systemd-service \
 				--enable-ofono \
--- a/src/net.connman.iwd.service
+++ /dev/null
@@ -1,5 +0,0 @@
-[D-BUS Service]
-Name=net.connman.iwd
-Exec=/bin/false
-User=root
-SystemdService=iwd.service
--- /dev/null
+++ b/src/net.connman.iwd.service.in
@@ -0,0 +1,5 @@
+[D-BUS Service]
+Name=net.connman.iwd
+Exec=@libexecdir@/iwd
+User=root
+SystemdService=iwd.service
--- a/wired/net.connman.ead.service
+++ /dev/null
@@ -1,5 +0,0 @@
-[D-BUS Service]
-Name=net.connman.ead
-Exec=/bin/false
-User=root
-SystemdService=ead.service
--- /dev/null
+++ b/wired/net.connman.ead.service.in
@@ -0,0 +1,5 @@
+[D-BUS Service]
+Name=net.connman.ead
+Exec=@libexecdir@/ead
+User=root
+SystemdService=ead.service
