]> code.ossystems Code Review - openembedded-core.git/commitdiff
mdadm: install the systemd service through Makefile
authorLiwei Song <liwei.song@windriver.com>
Thu, 16 May 2019 02:41:40 +0000 (22:41 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 May 2019 15:35:06 +0000 (16:35 +0100)
The original mdadm service may include variable like BINDIR,
It should use the real value of it, since the install method
"install-systemd" in Makefile can easily do such work, so don't
install it in bb file manually, use "make install-systemd" to
install all the service of mdadm.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/mdadm/mdadm_4.1.bb

index ef5ddf55db39d732f5e36d1597cdde4fcd7082a1..597faf787a67070adb4472cec500ddea3f56b917 100644 (file)
@@ -57,13 +57,15 @@ do_install() {
 do_install_append() {
         install -d ${D}/${sysconfdir}/
         install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
-        install -d ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/mdmonitor.service ${D}/${systemd_unitdir}/system
-        install -m 644 ${S}/systemd/mdmon@.service ${D}/${systemd_unitdir}/system
         install -d ${D}/${sysconfdir}/init.d
         install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
 }
 
+do_install_append() {
+        oe_runmake install-systemd DESTDIR=${D}
+}
+
+
 do_compile_ptest() {
        oe_runmake test
 }
@@ -90,3 +92,5 @@ RRECOMMENDS_${PN}-ptest += " \
     kernel-module-raid10 \
     kernel-module-raid456 \
 "
+
+FILES_${PN} += "/lib/systemd/*"