add a configuration file in /usr/lib/tmpfiles.d for creating the /run/mdadm directory during the boot process

This commit is contained in:
eulerstorage 2020-03-09 18:11:31 +08:00
parent 2e6aff3057
commit e28e1c684b
3 changed files with 14 additions and 2 deletions

1
mdadm.conf Normal file
View File

@ -0,0 +1 @@
d /run/mdadm 0710 root root -

View File

@ -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 <eulerstoragemt@huawei.com> - 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 <eulerstoragemt@huawei.com> - 4.1-rc2.0.8
- Type:bugfix
- ID:NA

View File

@ -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