diff options
author | Erik Troan <ewt@redhat.com> | 2000-05-12 23:31:06 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-05-12 23:31:06 +0000 |
commit | 7b9be0ade407c0c7340c650cef51d76e77076838 (patch) | |
tree | 32b2c66108214a7b6ed51ca456ff0b1a52a13e2e /image.py | |
parent | eb2c1be6ac53a4f07a47da48052625fe14e78141 (diff) | |
download | anaconda-7b9be0ade407c0c7340c650cef51d76e77076838.tar.gz anaconda-7b9be0ade407c0c7340c650cef51d76e77076838.tar.xz anaconda-7b9be0ade407c0c7340c650cef51d76e77076838.zip |
made cdrom switching more robust
Diffstat (limited to 'image.py')
-rw-r--r-- | image.py | 28 |
1 files changed, 23 insertions, 5 deletions
@@ -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] |