[master fedora-17] Simplify what we dump in device.map for grub2-2.0-0.24.beta4.fc17 .

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

 



As of beta4, we shouldn't need to generate a device map for mdraid and
such:

<phcoder> a) You create entries only for IMSM, dmraid and real disks
---
 pyanaconda/bootloader.py |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 062361d..327c587 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1700,8 +1700,6 @@ class GRUB2(GRUB):
         if os.access(map_path, os.R_OK):
             os.rename(map_path, map_path + ".anacbak")
 
-        dev_map = open(map_path, "w")
-        dev_map.write("# this device map was generated by anaconda\n")
         devices = self.drives
         if self.stage1_drive not in devices:
             devices.append(self.stage1_drive)
@@ -1710,6 +1708,13 @@ class GRUB2(GRUB):
             if disk not in devices:
                 devices.append(disk)
 
+        devices = [d for d in devices if d.isDisk]
+
+        if len(devices) == 0:
+            return
+
+        dev_map = open(map_path, "w")
+        dev_map.write("# this device map was generated by anaconda\n")
         for drive in devices:
             dev_map.write("%s      %s\n" % (self.grub_device_name(drive),
                                             drive.path))
-- 
1.7.9.3

_______________________________________________
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