From 8ef1ac1e077af2c535ad2feb493ae8c187415f76 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 1 Feb 2008 22:01:46 +0000 Subject: [PATCH] - add a udev rules file for device assembly (#429604) --- mdadm.rules | 6 ++++++ mdadm.spec | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 mdadm.rules diff --git a/mdadm.rules b/mdadm.rules new file mode 100644 index 0000000..bffa738 --- /dev/null +++ b/mdadm.rules @@ -0,0 +1,6 @@ +# This file causes block devices with Linux RAID (mdadm) signatures to +# automatically cause mdadm to be run. +# See udev(8) for syntax + +SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="linux_raid*", \ + RUN+="/sbin/mdadm --incremental $root/%k" diff --git a/mdadm.spec b/mdadm.spec index 432c964..0f71260 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -4,6 +4,7 @@ Version: 2.6.4 Release: 2%{?dist} Source: http://www.cse.unsw.edu.au/~neilb/source/mdadm/mdadm-%{version}.tgz Source1: mdmonitor.init +Source2: mdadm.rules Patch1: mdadm-2.5.2-s390-build.patch Patch2: mdadm-2.5.2-static.patch Patch3: mdadm-2.2-nodiet.patch @@ -40,6 +41,8 @@ make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS" SYSCONFDIR="%{_sysconfdir}" MDASSE rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} BINDIR=/sbin install install -Dp -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/mdmonitor +mkdir -p -m 755 $RPM_BUILD_ROOT/etc/udev/rules.d +install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/udev/rules.d/70-mdadm.rules mkdir -p -m 700 $RPM_BUILD_ROOT/var/run/mdadm @@ -73,12 +76,16 @@ fi %files %defattr(-,root,root,-) %doc TODO ChangeLog mdadm.conf-example COPYING misc/* +/etc/udev/rules.d/* /sbin/* %{_initrddir}/* %{_mandir}/man*/md* %attr(0700,root,root) %dir /var/run/mdadm %changelog +* Fri Feb 1 2008 Bill Nottingham - 2.6.4-3 +- add a udev rules file for device assembly (#429604) + * Fri Jan 18 2008 Doug Ledford - 2.6.4-2 - Bump version and rebuild