summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-08-28 15:52:26 +0000
committerErik Troan <ewt@redhat.com>1999-08-28 15:52:26 +0000
commit6d9c007e94a6e7eb15681838d41c33031a6690c4 (patch)
tree320831c5f294d1cd9459aad6ee0ef43363739a4b /todo.py
parent4e72b77944ba4183f4ac64789ad010580553c4d5 (diff)
downloadanaconda-6d9c007e94a6e7eb15681838d41c33031a6690c4.tar.gz
anaconda-6d9c007e94a6e7eb15681838d41c33031a6690c4.tar.xz
anaconda-6d9c007e94a6e7eb15681838d41c33031a6690c4.zip
iutil.py
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py39
1 files changed, 38 insertions, 1 deletions
diff --git a/todo.py b/todo.py
index f65431dc6..6369d9a97 100644
--- a/todo.py
+++ b/todo.py
@@ -295,7 +295,8 @@ class ToDo:
self.upgrade = 0
self.lilo = LiloConfiguration()
self.initrdsMade = {}
-
+ self.liloImages = {}
+
def umountFilesystems(self):
if (not self.setupFilesystems): return
@@ -311,6 +312,42 @@ class ToDo:
# XXX
pass
+ def getLiloImages(self):
+ if self.liloImages:
+ return self.liloImages
+
+ drives = self.drives.available ().keys ()
+ images = {}
+ for drive in drives:
+ try:
+ table = _balkan.readTable ('/tmp/' + drive)
+ except SystemError:
+ pass
+ else:
+ for i in range (len (table)):
+ (type, sector, size) = table[i]
+ if size and (type == 1 or type == 2):
+ dev = drive + str (i + 1)
+ images[dev] = ("", type)
+
+ if (not images): return None
+
+ mountsByDev = {}
+ for loc in self.mounts.keys():
+ (device, fsystem, reformat) = self.mounts[loc]
+ mountsByDev[device] = loc
+
+ for dev in images.keys():
+ if (mountsByDev.has_key(dev)):
+ if mountsByDev[dev] == '/':
+ default = dev
+ images[dev] = ("linux", 2)
+ else:
+ del images[dev]
+
+ self.liloImages = images
+ return self.liloImages
+
def mountFilesystems(self):
if (not self.setupFilesystems): return