]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
mdraid: prefer /etc/mdadm.conf over /etc/mdadm/mdadm.conf
authorHarald Hoyer <harald@redhat.com>
Wed, 27 Jan 2010 14:52:08 +0000 (15:52 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 27 Jan 2010 14:59:10 +0000 (15:59 +0100)
see https://bugzilla.redhat.com/show_bug.cgi?id=557339
https://bugzilla.redhat.com/show_bug.cgi?id=559073

modules.d/90mdraid/install

index 059edfbd5beae8345b7c3dac9349c5ab383221d6..6045aaf904d605f58bfe66b05b8adeebba2e4cf7 100755 (executable)
@@ -22,8 +22,11 @@ if ! mdadm -Q -e imsm /dev/null &> /dev/null; then
 fi
 
 if [[ $hostonly ]] || [[ $mdadmconf = "yes" ]]; then 
-    [ -f /etc/mdadm/mdadm.conf ] && inst /etc/mdadm/mdadm.conf /etc/mdadm.conf
-    [ -f /etc/mdadm.conf ] && inst /etc/mdadm.conf
+    if [ -f /etc/mdadm.conf ]; then
+        inst /etc/mdadm.conf
+    else
+        [ -f /etc/mdadm/mdadm.conf ] && inst /etc/mdadm/mdadm.conf /etc/mdadm.conf
+    fi
 fi
 
 if [ -x  /sbin/mdmon ] ; then