diff options
author | Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> | 2019-02-21 14:06:42 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 22:27:38 +0000 |
commit | f1c7d5d719365448c7cd43e699b3449488fd3bd8 (patch) | |
tree | 9c50165a9db965cea6a60e4e56e8849622425176 /meta/recipes-extended/mdadm/mdadm_4.0.bb | |
parent | 7756de368de1654f059343c3cd766a43d10b5d9b (diff) | |
download | poky-f1c7d5d719365448c7cd43e699b3449488fd3bd8.tar.gz |
mdadm: add init and service scripts
Add init script and service file for sysvinit and systemd.
(From OE-Core rev: 4556380fc582646506fb69a18ad2c8ded904b8ba)
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Hong Liu <hongl.fnst@cn.fujitsu.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/mdadm/mdadm_4.0.bb')
-rw-r--r-- | meta/recipes-extended/mdadm/mdadm_4.0.bb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/meta/recipes-extended/mdadm/mdadm_4.0.bb b/meta/recipes-extended/mdadm/mdadm_4.0.bb index 2c4d88a9e7..8155ae41b4 100644 --- a/meta/recipes-extended/mdadm/mdadm_4.0.bb +++ b/meta/recipes-extended/mdadm/mdadm_4.0.bb | |||
@@ -24,12 +24,14 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ | |||
24 | file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \ | 24 | file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \ |
25 | file://0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch \ | 25 | file://0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch \ |
26 | file://0001-Disable-gcc8-warnings.patch \ | 26 | file://0001-Disable-gcc8-warnings.patch \ |
27 | file://mdadm.init \ | ||
28 | file://mdmonitor.service \ | ||
27 | " | 29 | " |
28 | SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d" | 30 | SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d" |
29 | SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9" | 31 | SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9" |
30 | 32 | ||
31 | CFLAGS += "-fno-strict-aliasing" | 33 | CFLAGS += "-fno-strict-aliasing" |
32 | inherit autotools-brokensep | 34 | inherit autotools-brokensep systemd |
33 | 35 | ||
34 | EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"' | 36 | EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"' |
35 | # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h | 37 | # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h |
@@ -51,7 +53,17 @@ do_install() { | |||
51 | autotools_do_install | 53 | autotools_do_install |
52 | } | 54 | } |
53 | 55 | ||
54 | inherit ptest | 56 | do_install_append() { |
57 | install -d ${D}/${sysconfdir}/ | ||
58 | install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf | ||
59 | install -d ${D}/${systemd_unitdir}/system | ||
60 | install -m 644 ${S}/systemd/mdmonitor.service ${D}/${systemd_unitdir}/system | ||
61 | install -d ${D}/${sysconfdir}/init.d | ||
62 | install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor | ||
63 | } | ||
64 | |||
65 | SYSTEMD_SERVICE_${PN} = "mdmonitor.service" | ||
66 | SYSTEMD_AUTO_ENABLE = "disable" | ||
55 | 67 | ||
56 | do_compile_ptest() { | 68 | do_compile_ptest() { |
57 | oe_runmake test | 69 | oe_runmake test |
@@ -67,6 +79,7 @@ do_install_ptest() { | |||
67 | install -D -m 755 $prg ${D}${PTEST_PATH}/ | 79 | install -D -m 755 $prg ${D}${PTEST_PATH}/ |
68 | done | 80 | done |
69 | } | 81 | } |
82 | |||
70 | RDEPENDS_${PN}-ptest += "bash" | 83 | RDEPENDS_${PN}-ptest += "bash" |
71 | RRECOMMENDS_${PN}-ptest += " \ | 84 | RRECOMMENDS_${PN}-ptest += " \ |
72 | coreutils \ | 85 | coreutils \ |