]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
mdraid/module-setup.sh: install configs from /etc/mdadm.conf.d
authorAlexander Tsoy <alexander@tsoy.me>
Thu, 3 Oct 2013 10:54:42 +0000 (14:54 +0400)
committerHarald Hoyer <harald@redhat.com>
Fri, 4 Oct 2013 11:56:41 +0000 (13:56 +0200)
/etc/mdadm.conf.d directory is supported since mdadm-3.3

modules.d/90mdraid/module-setup.sh

index 5df2274b3acd8e6156fc04b7982223c0d2866843..45767c67cbd39f5f8f9ba6a71c5b142d8cdd048c 100755 (executable)
@@ -93,6 +93,14 @@ install() {
         else
             [ -f /etc/mdadm/mdadm.conf ] && inst /etc/mdadm/mdadm.conf /etc/mdadm.conf
         fi
+        if [ -d /etc/mdadm.conf.d ]; then
+            local f
+            inst_dir /etc/mdadm.conf.d
+            for f in /etc/mdadm.conf.d/*.conf; do
+                [ -f "$f" ] || continue
+                inst "$f"
+            done
+        fi
     fi
 
     inst_hook pre-udev 30 "$moddir/mdmon-pre-udev.sh"