diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-10-22 21:24:48 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-10-22 21:24:48 +0000 |
commit | 81d5cd39f902955f546c08818b599b2cf286c1ee (patch) | |
tree | 90acffc1ae89c8e94e0bc5d9bf69f7503a1e23c4 /textw/upgrade_bootloader_text.py | |
parent | e0ab6dadf01fd976b368c180c18f499ab3d72171 (diff) | |
download | anaconda-81d5cd39f902955f546c08818b599b2cf286c1ee.tar.gz anaconda-81d5cd39f902955f546c08818b599b2cf286c1ee.tar.xz anaconda-81d5cd39f902955f546c08818b599b2cf286c1ee.zip |
2007-10-22 Jeremy Katz <katzj@redhat.com>
* iw/upgrade_bootloader_gui.py
(UpgradeBootloaderWindow._newToLibata): Sync up with text mode version
* textw/upgrade_bootloader_text.py
(UpgradeBootloaderWindow._ideToLibata): Improve check so that it
doesn't see F7 -> F8 updates as needing a new config
Diffstat (limited to 'textw/upgrade_bootloader_text.py')
-rw-r--r-- | textw/upgrade_bootloader_text.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/textw/upgrade_bootloader_text.py b/textw/upgrade_bootloader_text.py index 55425baa9..59e071344 100644 --- a/textw/upgrade_bootloader_text.py +++ b/textw/upgrade_bootloader_text.py @@ -41,21 +41,38 @@ class UpgradeBootloaderWindow: log.debug("error reading /etc/modprobe.conf") return False - lines = f.readlines() + modlines = f.readlines() f.close() - for l in lines: + try: + f = open("/tmp/scsidisks") + except: + log.debug("error reading /tmp/scsidisks") + return False + mods = [] + for l in f.readlines(): + (disk, mod) = l.split() + if mod.strip() not in mods: + mods.append(mod.strip()) + f.close() + + for l in modlines: stripped = l.strip() if stripped == "" or stripped[0] == "#": continue if stripped.find("scsi_hostadapter") != -1: - return True + mod = stripped.split()[-1] + if mod in mods: + mods.remove(mod) + if len(mods) > 0: + return True return False def __call__(self, screen, anaconda): + self.screen = screen self.dispatch = anaconda.dispatch self.bl = anaconda.id.bootloader |