* [PATCH 1/2] mdadm: guarded with systemd when install mdadm service
@ 2019-05-22 9:04 Liwei Song
2019-05-22 9:04 ` [PATCH 2/2] mdadm: define MAILADDR for mdmonitor service Liwei Song
0 siblings, 1 reply; 2+ messages in thread
From: Liwei Song @ 2019-05-22 9:04 UTC (permalink / raw)
To: oe-core
install mdadm related service only when systemd was included
in DISTRO_FEATURES.
Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
meta/recipes-extended/mdadm/mdadm_4.1.bb | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 597faf787a67..8ca42a89ddc5 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -59,13 +59,11 @@ do_install_append() {
install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
install -d ${D}/${sysconfdir}/init.d
install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
+ oe_runmake install-systemd DESTDIR=${D}
+ fi
}
-do_install_append() {
- oe_runmake install-systemd DESTDIR=${D}
-}
-
-
do_compile_ptest() {
oe_runmake test
}
@@ -93,4 +91,4 @@ RRECOMMENDS_${PN}-ptest += " \
kernel-module-raid456 \
"
-FILES_${PN} += "/lib/systemd/*"
+FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','/lib/systemd/*', '', d)}"
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] mdadm: define MAILADDR for mdmonitor service
2019-05-22 9:04 [PATCH 1/2] mdadm: guarded with systemd when install mdadm service Liwei Song
@ 2019-05-22 9:04 ` Liwei Song
0 siblings, 0 replies; 2+ messages in thread
From: Liwei Song @ 2019-05-22 9:04 UTC (permalink / raw)
To: oe-core
by default in mdmonitor.service it use mail address to report alerts
but this need to set MAILADDR in /etc/mdadm.conf, or the service
will be failed excuted.
This patch will set MAILADD to "root" in /etc/mdadm.conf
to aviod service run with error.
Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
meta/recipes-extended/mdadm/mdadm_4.1.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 8ca42a89ddc5..8ec1c22a0c62 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -57,6 +57,7 @@ do_install() {
do_install_append() {
install -d ${D}/${sysconfdir}/
install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
+ sed -i "s/#MAILADDR root@mydomain.tld/MAILADDR root/" ${D}${sysconfdir}/mdadm.conf
install -d ${D}/${sysconfdir}/init.d
install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-22 9:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 9:04 [PATCH 1/2] mdadm: guarded with systemd when install mdadm service Liwei Song
2019-05-22 9:04 ` [PATCH 2/2] mdadm: define MAILADDR for mdmonitor service Liwei Song
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.