refering to bug 395881. let mdadm do its stuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi List:

In anaconda, when it is time to write the mdadm.conf file, it is done by each device object "ent.device.mdadmLine()".  This is all good, but when other mdN devices that are not in the object list (for whatever reason, look at bug :), are needed to boot the system properly after update or install, this method might present a problem.  I just say: "use mdadm".  Patch attached.

/me gets prepared to get screamed at for missing something completely obvious. :)

Regards. --
Joel Andres Granados
Red Hat / Brno, Czech Republic
diff --git a/fsset.py b/fsset.py
index 1038074..5470e91 100644
--- a/fsset.py
+++ b/fsset.py
@@ -1375,25 +1375,6 @@ class FileSystemSet:
 
         return raidtab
 
-    def mdadmConf(self):
-        raident = 0
-
-        cf = """
-# mdadm.conf written out by anaconda
-DEVICE partitions
-MAILADDR root
-"""
-        for ent in self.entries:
-            if ent.device.getName() != "RAIDDevice":
-                continue
-
-            raident +=1
-            cf = cf + ent.device.mdadmLine()
-
-        if raident > 0:
-            return cf
-        return
-
     def crypttab(self):
         """set up /etc/crypttab"""
         crypttab = ""
@@ -1412,7 +1393,7 @@ MAILADDR root
 
         if cf:
             f = open (prefix + "/etc/mdadm.conf", "w")
-            f.write (cf)
+            iutil.execWithRedirect("mdadm", ["--detail", "--scan"], stdout=f)
             f.close ()
 
         crypttab = self.crypttab()
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux