package/iucode-tool: Add systemd service config
authorAlex Suykov <alex.suykov@gmail.com>
Tue, 15 May 2018 10:18:02 +0000 (12:18 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 19 May 2018 19:35:45 +0000 (21:35 +0200)
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: David De Grave (Essensium/Mind) <david.degrave@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/iucode-tool/iucode-tool.mk
package/iucode-tool/iucode.service [new file with mode: 0644]

index fb746c3cb891d068faf1a6e6ebd71299784acbe9..38f9da438edde296792f9a4b772d779f3389534e 100644 (file)
@@ -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 (file)
index 0000000..d99acc6
--- /dev/null
@@ -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