package/pcsc-lite: enable systemd socket activation
authorPieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
Tue, 28 Mar 2017 09:55:47 +0000 (11:55 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 28 Mar 2017 19:45:13 +0000 (21:45 +0200)
pcsc-lite installs systemd service files, but they are not used.
Enable pcscd.socket so that systemd starts the daemon when the
first client connects.

Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pcsc-lite/pcsc-lite.mk

index e53c004e8b61d4c19421bcb71fb19e9a44b7af55..3349b6ca07528d67f629c800e1ec20c3bec2c1ae 100644 (file)
@@ -37,4 +37,10 @@ ifeq ($(PACKAGE_PCSC_LITE_EMBEDDED),y)
 PCSC_LITE_CONF_OPTS += --enable-embedded
 endif
 
+define PCSC_LITE_INSTALL_INIT_SYSTEMD
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/sockets.target.wants
+       ln -sf ../../../../usr/lib/systemd/system/pcscd.socket \
+               $(TARGET_DIR)/etc/systemd/system/sockets.target.wants/pcscd.socket
+endef
+
 $(eval $(autotools-package))