From 99d30f1fafcfe0a146151fbc5d25b57551ee3a4f Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Thu, 19 Mar 2015 14:02:02 -0700 Subject: [PATCH] package/haveged: add systemd units Signed-off-by: Steven Noonan Reviewed-by: Mike Williams Signed-off-by: Thomas Petazzoni --- package/haveged/haveged.mk | 8 ++++++++ package/haveged/haveged.service | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 package/haveged/haveged.service diff --git a/package/haveged/haveged.mk b/package/haveged/haveged.mk index 88d85cd0dd..c68f76633c 100644 --- a/package/haveged/haveged.mk +++ b/package/haveged/haveged.mk @@ -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 index 0000000000..d87fe5bc97 --- /dev/null +++ b/package/haveged/haveged.service @@ -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 -- 2.30.2