Blame SOURCES/0017-mdraid-module-setup.sh-install-configs-from-etc-mdad.patch

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