[OE-core] [PATCH] mdadm:add mdmonitor.service
Zang Ruochen
zangrc.fnst at cn.fujitsu.com
Fri Jul 26 02:22:10 UTC 2019
-The original mdmonitor.service is wrong, so append new
mdmonitor.service.
Signed-off-by: Zang Ruochen <zangrc.fnst at cn.fujitsu.com>
---
meta/recipes-extended/mdadm/files/mdmonitor.service | 10 ++++++++++
meta/recipes-extended/mdadm/mdadm_4.1.bb | 2 ++
2 files changed, 12 insertions(+)
create mode 100644 meta/recipes-extended/mdadm/files/mdmonitor.service
diff --git a/meta/recipes-extended/mdadm/files/mdmonitor.service b/meta/recipes-extended/mdadm/files/mdmonitor.service
new file mode 100644
index 0000000000..4f07c755ae
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdmonitor.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Software RAID monitoring and management
+ConditionPathExists=/etc/mdadm.conf
+[Service]
+Type=forking
+PIDFile=/var/run/mdadm/mdadm.pid
+EnvironmentFile=-/etc/sysconfig/mdmonitor
+ExecStart=/sbin/mdadm --monitor --scan -f --pid-file=/var/run/mdadm/mdadm.pid
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 74c94f6ecb..daa2ed8e2e 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -20,6 +20,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
file://debian-no-Werror.patch \
file://0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch \
file://mdadm.init \
+ file://mdmonitor.service \
file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \
file://include_sysmacros.patch \
"
@@ -65,6 +66,7 @@ do_install_append() {
do_install_append() {
oe_runmake install-systemd DESTDIR=${D}
+ install -m 644 ${WORKDIR}/mdmonitor.service ${D}/lib/systemd/system/mdmonitor.service
}
do_compile_ptest() {
--
2.20.1
More information about the Openembedded-core
mailing list