-The original file mdmonitor.service is as follows: ... |[Service] |Environment= MDADM_MONITOR_ARGS=--scan |EnvironmentFile=-/run/sysconfig/mdadm |ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh |ExecStart=/sbin/mdadm --monitor -y $MDADM_MONITOR_ARGS ... -It has a syntax error and it doesn't work properly, so add new file mdmonitor.service to overwrite it.
Signed-off-by: Zang Ruochen <[email protected]> --- 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 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
