diff options
author | Erik Troan <ewt@redhat.com> | 1999-08-28 15:52:26 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-08-28 15:52:26 +0000 |
commit | 6d9c007e94a6e7eb15681838d41c33031a6690c4 (patch) | |
tree | 320831c5f294d1cd9459aad6ee0ef43363739a4b /todo.py | |
parent | 4e72b77944ba4183f4ac64789ad010580553c4d5 (diff) | |
download | anaconda-6d9c007e94a6e7eb15681838d41c33031a6690c4.tar.gz anaconda-6d9c007e94a6e7eb15681838d41c33031a6690c4.tar.xz anaconda-6d9c007e94a6e7eb15681838d41c33031a6690c4.zip |
iutil.py
Diffstat (limited to 'todo.py')
-rw-r--r-- | todo.py | 39 |
1 files changed, 38 insertions, 1 deletions
@@ -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 |