package/haveged: add systemd units
authorSteven Noonan <steven@uplinklabs.net>
Thu, 19 Mar 2015 21:02:02 +0000 (14:02 -0700)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 20 Mar 2015 13:11:39 +0000 (14:11 +0100)
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Mike Williams <mike@mikebwilliams.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/haveged/haveged.mk
package/haveged/haveged.service [new file with mode: 0644]

index 88d85cd0ddc6ea2c207ca4d25d77e602aefa9564..c68f76633c598b520a81205a47b3a89f36687c06 100644 (file)
@@ -14,4 +14,12 @@ define HAVEGED_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S21haveged
 endef
 
+define HAVEGED_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 644 package/haveged/haveged.service \
+               $(TARGET_DIR)/usr/lib/systemd/system/haveged.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -fs /usr/lib/systemd/system/haveged.service \
+               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/haveged.service
+endef
+
 $(eval $(autotools-package))
diff --git a/package/haveged/haveged.service b/package/haveged/haveged.service
new file mode 100644 (file)
index 0000000..d87fe5b
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Entropy Harvesting Daemon
+Documentation=man:haveged(8)
+
+[Service]
+ExecStart=/usr/bin/haveged -F -w 1024 -v 1
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target