From e28e1c684bc27b0b929a9032c26e9f94e073d830 Mon Sep 17 00:00:00 2001 From: eulerstorage Date: Mon, 9 Mar 2020 18:11:31 +0800 Subject: [PATCH] add a configuration file in /usr/lib/tmpfiles.d for creating the /run/mdadm directory during the boot process --- mdadm.conf | 1 + mdadm.spec | 12 +++++++++++- mdmonitor.service | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 mdadm.conf diff --git a/mdadm.conf b/mdadm.conf new file mode 100644 index 0000000..3207dda --- /dev/null +++ b/mdadm.conf @@ -0,0 +1 @@ +d /run/mdadm 0710 root root - diff --git a/mdadm.spec b/mdadm.spec index 7a67351..e77fe15 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,6 +1,6 @@ Name: mdadm Version: 4.1 -Release: rc2.0.8 +Release: rc2.0.9 Summary: The software RAID arrays user manage tools License: GPLv2+ URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ @@ -8,6 +8,7 @@ URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ Source0: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}-rc2.tar.xz Source1: mdcheck-cron Source2: mdmonitor.service +Source3: mdadm.conf Patch6000: 6000-Assemble-free-resources-in-load_devices.patch Patch6001: 6001-Assemble-set-devices-to-NULL-when-load_devices-can-t.patch @@ -55,6 +56,8 @@ install -Dp -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.d/mdcheck #install mdmonitor.service from local file install -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir} +mkdir -p %{buildroot}%{_tmpfilesdir} +install -m 644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/mdadm.conf install -d -m 710 %{buildroot}/var/run/mdadm/ %post @@ -75,12 +78,19 @@ install -d -m 710 %{buildroot}/var/run/mdadm/ %{_unitdir}/* /usr/lib/systemd/system-shutdown/mdadm.shutdown %config(noreplace) %{_sysconfdir}/cron.d/mdcheck +%config(noreplace) %{_tmpfilesdir}/mdadm.conf %dir %{_localstatedir}/run/mdadm/ %files help %{_mandir}/man*/* %changelog +* Mon Mar 9 2020 hy - 4.1-rc2.0.9 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: add a configuration file in /usr/lib/tmpfiles.d for creating the /run/mdadm directory during the boot process. + * Tue Mar 3 2020 hy - 4.1-rc2.0.8 - Type:bugfix - ID:NA diff --git a/mdmonitor.service b/mdmonitor.service index 1f6deb9..2a8988c 100644 --- a/mdmonitor.service +++ b/mdmonitor.service @@ -8,7 +8,8 @@ [Unit] Description=MD array monitor DefaultDependencies=no -ConditionPathExists=/run +Wants=systemd-tmpfiles-setup.service +After=systemd-tmpfiles-setup.service [Service] Type=forking -- Gitee