summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-05-12 23:31:06 +0000
committerErik Troan <ewt@redhat.com>2000-05-12 23:31:06 +0000
commit7b9be0ade407c0c7340c650cef51d76e77076838 (patch)
tree32b2c66108214a7b6ed51ca456ff0b1a52a13e2e /image.py
parenteb2c1be6ac53a4f07a47da48052625fe14e78141 (diff)
downloadanaconda-7b9be0ade407c0c7340c650cef51d76e77076838.tar.gz
anaconda-7b9be0ade407c0c7340c650cef51d76e77076838.tar.xz
anaconda-7b9be0ade407c0c7340c650cef51d76e77076838.zip
made cdrom switching more robust
Diffstat (limited to 'image.py')
-rw-r--r--image.py28
1 files changed, 23 insertions, 5 deletions
diff --git a/image.py b/image.py
index d8da84fdc..e8f2ca48a 100644
--- a/image.py
+++ b/image.py
@@ -37,13 +37,31 @@ class CdromInstallMethod(ImageInstallMethod):
def getFilename(self, h):
if h[1000002] != self.currentDisc:
self.currentDisc = h[1000002]
- isys.makeDevInode(self.device, "/tmp/cdrom")
isys.umount("/mnt/source")
- #isys.eject("/tmp/cdrom")
- self.messageWindow(_("Change CDROM"),
+ isys.ejectCdrom(self.device)
+
+ key = ".disc%d-%s" % (self.currentDisc, iutil.getArch())
+
+ done = 0
+ while not done:
+ self.messageWindow(_("Change CDROM"),
_("Please insert disc %d to continue.") % self.currentDisc)
- isys.mount("/tmp/cdrom", "/mnt/source", fstype = "iso9660",
- readOnly = 1)
+ isys.makeDevInode(self.device, "/tmp/cdrom")
+
+ try:
+ isys.mount("/tmp/cdrom", "/mnt/source", fstype = "iso9660",
+ readOnly = 1)
+
+ if os.access("/mnt/source/%s" % key, os.O_RDONLY):
+ done = 1
+ else:
+ self.messageWindow(_("Wrong CDROM"),
+ _("That's not the correct Red Hat CDROM."))
+ isys.umount("/mnt/source")
+ isys.ejectCdrom(self.device)
+ except:
+ self.messageWindow(_("Error"),
+ _("The CDROM could not be mounted."))
return self.tree + "/RedHat/RPMS/" + h[1000000]