From: Alex Suykov Date: Tue, 15 May 2018 10:18:02 +0000 (+0200) Subject: package/iucode-tool: Add systemd service config X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81fe62e09560f770a1d5de0ee2fd5810a022c072;p=buildroot.git package/iucode-tool: Add systemd service config Signed-off-by: Alex Suykov Signed-off-by: David De Grave (Essensium/Mind) Signed-off-by: Thomas Petazzoni --- 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