18971c
From fdaa69db2061cc83845f631e6e3216e55b2eb235 Mon Sep 17 00:00:00 2001
18971c
From: Alexander Tsoy <alexander@tsoy.me>
18971c
Date: Thu, 3 Oct 2013 14:54:42 +0400
18971c
Subject: [PATCH] mdraid/module-setup.sh: install configs from
18971c
 /etc/mdadm.conf.d
18971c
18971c
/etc/mdadm.conf.d directory is supported since mdadm-3.3
18971c
---
18971c
 modules.d/90mdraid/module-setup.sh | 8 ++++++++
18971c
 1 file changed, 8 insertions(+)
18971c
18971c
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
18971c
index 5df2274b..45767c67 100755
18971c
--- a/modules.d/90mdraid/module-setup.sh
18971c
+++ b/modules.d/90mdraid/module-setup.sh
18971c
@@ -93,6 +93,14 @@ install() {
18971c
         else
18971c
             [ -f /etc/mdadm/mdadm.conf ] && inst /etc/mdadm/mdadm.conf /etc/mdadm.conf
18971c
         fi
18971c
+        if [ -d /etc/mdadm.conf.d ]; then
18971c
+            local f
18971c
+            inst_dir /etc/mdadm.conf.d
18971c
+            for f in /etc/mdadm.conf.d/*.conf; do
18971c
+                [ -f "$f" ] || continue
18971c
+                inst "$f"
18971c
+            done
18971c
+        fi
18971c
     fi
18971c
 
18971c
     inst_hook pre-udev 30 "$moddir/mdmon-pre-udev.sh"