Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/1] package/iucode-tool: Add systemd service config
@ 2018-05-15 10:18 David De Grave
  2018-05-19 19:37 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: David De Grave @ 2018-05-15 10:18 UTC (permalink / raw)
  To: buildroot

From: Alex Suykov <alex.suykov@gmail.com>

Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: David De Grave (Essensium/Mind) <david.degrave@mind.be>
---
Changes v1 -> v2
	- Add 'RemainAfterExist=yes' to the unit file.
	- Change the link target to relative.
Changes v2 -> v3
	- Fixed copy/paste error in the link target.
---
 package/iucode-tool/iucode-tool.mk |  8 ++++++++
 package/iucode-tool/iucode.service | 10 ++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 package/iucode-tool/iucode.service

diff --git a/package/iucode-tool/iucode-tool.mk b/package/iucode-tool/iucode-tool.mk
index fb746c3cb8..38f9da438e 100644
--- a/package/iucode-tool/iucode-tool.mk
+++ b/package/iucode-tool/iucode-tool.mk
@@ -18,4 +18,12 @@ define IUCODE_TOOL_INSTALL_INIT_SYSV
 		$(TARGET_DIR)/etc/init.d/S00iucode-tool
 endef
 
+define IUCODE_TOOL_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 644 package/iucode-tool/iucode.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/iucode.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -sf ../../../../usr/lib/systemd/system/iucode.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/iucode.service
+endef
+
 $(eval $(autotools-package))
diff --git a/package/iucode-tool/iucode.service b/package/iucode-tool/iucode.service
new file mode 100644
index 0000000000..d99acc6a54
--- /dev/null
+++ b/package/iucode-tool/iucode.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Upload microcode into the processor
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/iucode_tool -k /usr/share/misc/intel-microcode.dat
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-19 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-15 10:18 [Buildroot] [PATCH v3 1/1] package/iucode-tool: Add systemd service config David De Grave
2018-05-19 19:37 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox