]> code.ossystems Code Review - openembedded-core.git/commitdiff
mdam: fix mdmonitor start up failure
authorChangqing Li <changqing.li@windriver.com>
Mon, 1 Jul 2019 05:04:53 +0000 (13:04 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Jul 2019 07:10:36 +0000 (08:10 +0100)
1. recently, mdadm has changed to use service file under srcdir,
   so remove the one not be used.
2. add -y option to fix below problem
   mdadm: No mail address or alert command - not monitoring

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch [new file with mode: 0644]
meta/recipes-extended/mdadm/files/mdmonitor.service [deleted file]
meta/recipes-extended/mdadm/mdadm_4.1.bb

diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch
new file mode 100644 (file)
index 0000000..e00287c
--- /dev/null
@@ -0,0 +1,28 @@
+From 5fdc0173cb4fcf8656f0889ad364d2549795607f Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 1 Jul 2019 11:34:49 +0800
+Subject: [PATCH] mdadm: add option -y for use syslog to recive event report
+
+fix service startup failed when there is
+No mail address or alert command
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ systemd/mdmonitor.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service
+index 46f7b88..3fc4687 100644
+--- a/systemd/mdmonitor.service
++++ b/systemd/mdmonitor.service
+@@ -13,4 +13,4 @@ DefaultDependencies=no
+ Environment=  MDADM_MONITOR_ARGS=--scan
+ EnvironmentFile=-/run/sysconfig/mdadm
+ ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
+-ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS
++ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/mdadm/files/mdmonitor.service b/meta/recipes-extended/mdadm/files/mdmonitor.service
deleted file mode 100644 (file)
index a81578e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#  This file is part of mdadm.
-#
-#  mdadm is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Software RAID monitoring and management
-ConditionPathExists=/etc/mdadm.conf
-
-[Service]
-Type=forking
-PIDFile=/var/run/mdadm/mdadm.pid
-EnvironmentFile=-/etc/sysconfig/mdmonitor
-ExecStartPre=mkdir -p /var/run/mdadm
-ExecStart=/sbin/mdadm --monitor -y --scan -f --pid-file=/var/run/mdadm/mdadm.pid
-
-[Install]
-WantedBy=multi-user.target
index 494b81b5e7955aae32d300538457af834b997a5f..766004fe9d111326bf8323c3bc079471a2f7738b 100644 (file)
@@ -19,7 +19,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
            file://0001-fix-gcc-8-format-truncation-warning.patch \
            file://debian-no-Werror.patch \
           file://mdadm.init \
-          file://mdmonitor.service \
+          file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \
            "
 SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598"
 SRC_URI[sha256sum] = "ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a"
@@ -65,7 +65,6 @@ do_install_append() {
         oe_runmake install-systemd DESTDIR=${D}
 }
 
-
 do_compile_ptest() {
        oe_runmake test
 }