[OE-core] [PATCH 2/2] mdadm: define MAILADDR for mdmonitor service

Liwei Song liwei.song at windriver.com
Wed May 22 09:04:25 UTC 2019


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 at 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 at 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



More information about the Openembedded-core mailing list