Skip to contentSkip to conversation

acpid: Add systemd service

PATCH New Alexander Sverdlin 2 participants 2 messages Nov 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 acpid: Add systemd service

This one is based on Archlinux's service file.

---
 package/acpid/acpid.mk      | 8 ++++++++
 package/acpid/acpid.service | 9 +++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 package/acpid/acpid.service
package/acpid/acpid.mk +8 -0
index 48fe005e5e..514fd31fe6 100644
@@ -10,6 +10,14 @@ ACPID_SITE = http://downloads.sourceforge.net/project/acpid2
 ACPID_LICENSE = GPL-2.0+
 ACPID_LICENSE_FILES = COPYING
 
+define ACPID_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 0755 package/acpid/acpid.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/acpid.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -sf ../../../../usr/lib/systemd/system/acpid.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/acpid.service
+endef
+
 define ACPID_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/acpid/S02acpid \
 		$(TARGET_DIR)/etc/init.d/S02acpid
package/acpid/acpid.service new file +9 -0
new file mode 100644
index 0000000000..5252b52f5f
@@ -0,0 +1,9 @@
+[Unit]
+Description=ACPI event daemon
+Documentation=man:acpid(8)
+
+[Service]
+ExecStart=/usr/sbin/acpid --foreground --netlink
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
2.19.1
#1 lore raw

PATCH v2 1/1 acpid: Add systemd service

Hello,

Quoted 8 lines · Alexander Sverdlin

This one is based on Archlinux's service file.

---
 package/acpid/acpid.mk      | 8 ++++++++
 package/acpid/acpid.service | 9 +++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 package/acpid/acpid.service

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com