summaryrefslogtreecommitdiffstats
path: root/textw/upgrade_bootloader_text.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2007-10-22 21:24:48 +0000
committerJeremy Katz <katzj@redhat.com>2007-10-22 21:24:48 +0000
commit81d5cd39f902955f546c08818b599b2cf286c1ee (patch)
tree90acffc1ae89c8e94e0bc5d9bf69f7503a1e23c4 /textw/upgrade_bootloader_text.py
parente0ab6dadf01fd976b368c180c18f499ab3d72171 (diff)
downloadanaconda-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.py23
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