From: Changqing Li Date: Mon, 24 Jun 2019 08:08:40 +0000 (+0800) Subject: mdadm: fix systemd service start up failure X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~14070 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d18c937918ec3553cb98743088a37ff080af2491;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git mdadm: fix systemd service start up failure 1. mdadm: No mail address or alert command - not monitoring fixed by use option -y to cause all events to be reported through 'syslog'. 2. cannot create pid file: No such file or directory fix by create dir before starting. Signed-off-by: Changqing Li Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-extended/mdadm/files/mdmonitor.service b/meta/recipes-extended/mdadm/files/mdmonitor.service index bd243b44989..a81578ead62 100644 --- a/meta/recipes-extended/mdadm/files/mdmonitor.service +++ b/meta/recipes-extended/mdadm/files/mdmonitor.service @@ -13,7 +13,8 @@ ConditionPathExists=/etc/mdadm.conf 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 +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