summaryrefslogtreecommitdiffstats
path: root/rescue.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-01-18 21:04:06 +0000
committerErik Troan <ewt@redhat.com>2001-01-18 21:04:06 +0000
commit0a3ca29e6f963712f3bc4b81ecb9a2883a244fb0 (patch)
tree1258ba4e1fb6c8f07345a5c72f90288a00074cbe /rescue.py
parentd6c22d0887393bf0e679484858b3fb37c56b8998 (diff)
downloadanaconda-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.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/rescue.py b/rescue.py
index 21101fdb9..0d21cf69d 100644
--- a/rescue.py
+++ b/rescue.py
@@ -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)