summaryrefslogtreecommitdiffstats
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
parent6ee4e5379e205ebf72eb188a64e8220e09c32510 (diff)
downloadmeta-openembedded-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>
-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 c0ad6656d..b3ff1cc2c 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"
14SRC_URI = "git://github.com/grondo/edac-utils \ 14SRC_URI = "git://github.com/grondo/edac-utils \
15 file://make-init-script-be-able-to-automatically-load-EDAC-.patch \ 15 file://make-init-script-be-able-to-automatically-load-EDAC-.patch \
16 file://add-restart-to-initscript.patch \ 16 file://add-restart-to-initscript.patch \
17 file://edac.service \
17" 18"
18 19
19inherit autotools-brokensep 20inherit autotools-brokensep systemd
20 21
21do_configure_prepend () { 22do_configure_prepend () {
22 touch ${S}/ChangeLog 23 touch ${S}/ChangeLog
@@ -31,4 +32,15 @@ RDEPENDS_${PN}_powerpc = "dmidecode"
31RDEPENDS_${PN}_powerpc64 = "dmidecode" 32RDEPENDS_${PN}_powerpc64 = "dmidecode"
32RDEPENDS_${PN}_append = " \ 33RDEPENDS_${PN}_append = " \
33 perl-module-file-basename perl-module-file-find perl-module-getopt-long perl-module-posix \ 34 perl-module-file-basename perl-module-file-find perl-module-getopt-long perl-module-posix \
35 perl-module-overload \
36 perl-module-overloading \
37 perl-module-file-glob \
34" 38"
39
40do_install_append() {
41 install -d ${D}${systemd_unitdir}/system
42 install -m 644 ${WORKDIR}/edac.service ${D}/${systemd_unitdir}/system
43 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}/${systemd_unitdir}/system/edac.service
44}
45
46SYSTEMD_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 000000000..9f687a8af
--- /dev/null
+++ b/meta-oe/recipes-support/edac-utils/files/edac.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=Initialize EDAC Drivers For Machine Hardware
3
4[Service]
5Type=oneshot
6ExecStart=@SBINDIR@/edac-ctl --register-labels
7ExecStop=@SBINDIR@/edac-ctl --unload
8RemainAfterExit=yes
9
10[Install]
11WantedBy=multi-user.target