Skip to contentSkip to conversation

package/iucode-tool: Add systemd service config

PATCH New David De Grave (Essensium/Mind) 2 participants 2 messages May 15, 2018 – May 19, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 package/iucode-tool: Add systemd service config

From: Alex Suykov <[email protected]>

---
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
package/iucode-tool/iucode-tool.mk +8 -0
index fb746c3cb8..38f9da438e 100644
@@ -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))
package/iucode-tool/iucode.service new file +10 -0
new file mode 100644
index 0000000000..d99acc6a54
@@ -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
Signature · 1 line
2.13.6
#1 lore raw

PATCH v3 1/1 package/iucode-tool: Add systemd service config

Hello,

Quoted 10 lines · David De Grave (Essensium/Mind)

From: Alex Suykov <[email protected]>

---
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.

Quoted 5 lines
---
 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

Applied to next, thanks.

Thomas

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