aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authordengke.du@windriver.com <dengke.du@windriver.com>2016-09-28 16:36:26 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2016-10-05 18:20:49 +0200
commitba54b98daf377c778eb78d0b86437388514104c4 (patch)
treedc447618c879a703ae5ac89f7a9c5f7354bdeacf /meta-oe/recipes-support
parent6ee4e5379e205ebf72eb188a64e8220e09c32510 (diff)
downloadmeta-openembedded-contrib-ba54b98daf377c778eb78d0b86437388514104c4.tar.gz
edac-utils: add systemd support and required dependencies for edac
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> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/edac-utils/edac-utils_git.bb14
-rw-r--r--meta-oe/recipes-support/edac-utils/files/edac.service11
2 files changed, 24 insertions, 1 deletions
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 c0ad6656d70..b3ff1cc2c9f 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 00000000000..9f687a8af2b
--- /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