summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-08-19 21:53:30 +0000
committerJeremy Katz <katzj@redhat.com>2002-08-19 21:53:30 +0000
commit03529e7352cbb44a8ea7dd9a713abe7341cdf4d4 (patch)
treeaaeaf540d83d7bb95f21cee98b0e9bba86ab595f /image.py
parent4099b41e1260d750f000df4c244b5a75230f4493 (diff)
downloadanaconda-03529e7352cbb44a8ea7dd9a713abe7341cdf4d4.tar.gz
anaconda-03529e7352cbb44a8ea7dd9a713abe7341cdf4d4.tar.xz
anaconda-03529e7352cbb44a8ea7dd9a713abe7341cdf4d4.zip
try to unmount the cd if we get a failure installing a package so that the
user can eject their CD if they want and change it for one that isn't cracked down the middle
Diffstat (limited to 'image.py')
-rw-r--r--image.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/image.py b/image.py
index 2a65bbaeb..fc166207e 100644
--- a/image.py
+++ b/image.py
@@ -51,12 +51,31 @@ class ImageInstallMethod(InstallMethod):
return path
+ def unmountCD(self):
+ pass
+
def __init__(self, tree, rootPath):
InstallMethod.__init__(self, rootPath)
self.tree = tree
class CdromInstallMethod(ImageInstallMethod):
+ def unmountCD(self):
+ done = 0
+ while done == 0:
+ try:
+ isys.umount("/mnt/source")
+ self.currentDisc = []
+ break
+ except:
+ self.messageWindow(_("Error"),
+ _("An error occurred unmounting the CD. "
+ "Please make sure you're not accessing "
+ "%s from the shell on tty2 "
+ "and then click OK to retry.")
+ % ("/mnt/source",))
+
+
def systemUnmounted(self):
if self.loopbackFile:
isys.makeDevInode("loop0", "/tmp/loop")
@@ -328,7 +347,6 @@ def findIsoImages(path, messageWindow):
return discImages
class NfsIsoInstallMethod(NfsInstallMethod):
-
def getFilename(self, h, timer):
if self.imageMounted != h[1000002]:
self.umountImage()