All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dengke Du <dengke.du@windriver.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: [meta-oe][PATCH V2] edac-utils: add systemd support and required dependencies for edac
Date: Wed, 28 Sep 2016 16:36:26 +0800	[thread overview]
Message-ID: <1475051786-117691-1-git-send-email-dengke.du@windriver.com> (raw)

Changed in V2:
	Change the title to eliminate confused.

Add systemd unit files for edac-utils.

Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
 meta-oe/recipes-support/edac-utils/edac-utils_git.bb  | 14 +++++++++++++-
 meta-oe/recipes-support/edac-utils/files/edac.service | 11 +++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/edac-utils/files/edac.service

diff --git a/meta-oe/recipes-support/edac-utils/edac-utils_git.bb b/meta-oe/recipes-support/edac-utils/edac-utils_git.bb
index c0ad665..b3ff1cc 100644
--- a/meta-oe/recipes-support/edac-utils/edac-utils_git.bb
+++ b/meta-oe/recipes-support/edac-utils/edac-utils_git.bb
@@ -14,9 +14,10 @@ S = "${WORKDIR}/git"
 SRC_URI = "git://github.com/grondo/edac-utils \
     file://make-init-script-be-able-to-automatically-load-EDAC-.patch \
     file://add-restart-to-initscript.patch \
+    file://edac.service \
 "
 
-inherit autotools-brokensep
+inherit autotools-brokensep systemd
 
 do_configure_prepend () {
     touch ${S}/ChangeLog
@@ -31,4 +32,15 @@ RDEPENDS_${PN}_powerpc = "dmidecode"
 RDEPENDS_${PN}_powerpc64 = "dmidecode"
 RDEPENDS_${PN}_append = " \
     perl-module-file-basename perl-module-file-find perl-module-getopt-long perl-module-posix \
+    perl-module-overload \
+    perl-module-overloading \
+    perl-module-file-glob \
 "
+
+do_install_append() {
+	install -d ${D}${systemd_unitdir}/system
+	install -m 644 ${WORKDIR}/edac.service ${D}/${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}/${systemd_unitdir}/system/edac.service
+}
+
+SYSTEMD_SERVICE_${PN} = "edac.service"
diff --git a/meta-oe/recipes-support/edac-utils/files/edac.service b/meta-oe/recipes-support/edac-utils/files/edac.service
new file mode 100644
index 0000000..9f687a8
--- /dev/null
+++ b/meta-oe/recipes-support/edac-utils/files/edac.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Initialize EDAC Drivers For Machine Hardware
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/edac-ctl --register-labels
+ExecStop=@SBINDIR@/edac-ctl --unload
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
-- 
2.7.4



                 reply	other threads:[~2016-09-28  8:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475051786-117691-1-git-send-email-dengke.du@windriver.com \
    --to=dengke.du@windriver.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.