diff options
author | Erik Troan <ewt@redhat.com> | 2001-01-18 21:04:06 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-01-18 21:04:06 +0000 |
commit | 0a3ca29e6f963712f3bc4b81ecb9a2883a244fb0 (patch) | |
tree | 1258ba4e1fb6c8f07345a5c72f90288a00074cbe /rescue.py | |
parent | d6c22d0887393bf0e679484858b3fb37c56b8998 (diff) | |
download | anaconda-0a3ca29e6f963712f3bc4b81ecb9a2883a244fb0.tar.gz anaconda-0a3ca29e6f963712f3bc4b81ecb9a2883a244fb0.tar.xz anaconda-0a3ca29e6f963712f3bc4b81ecb9a2883a244fb0.zip |
1) better error handling for systems w/o and block devices
2) better error handling in rescue mode
Diffstat (limited to 'rescue.py')
-rw-r--r-- | rescue.py | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -15,12 +15,23 @@ class RescueInterface: def runRescue(serial): - screen = SnackScreen() - intf = RescueInterface(screen) - from fstab import NewtFstab - fstab = NewtFstab(1, serial, 0, 0, None, None, None, 0, [], 0, 0) + fstab = None + + try: + fstab = NewtFstab(1, serial, 0, 0, None, None, None, 0, [], 0, 0, + requireBlockDevices = 0) + except SystemError, text: + print _("WARNING: no valid block devices were found.\n") + except: + print _("ERROR: unknown error encountered reading partition tables.\n") + + if not fstab: + os.execv("/bin/sh", [ "-/bin/sh" ]) + + screen = SnackScreen() + intf = RescueInterface(screen) parts = upgrade.findExistingRoots(intf, fstab) |