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

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