diff options
author | Erik Troan <ewt@redhat.com> | 2000-05-11 16:42:35 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-05-11 16:42:35 +0000 |
commit | 5fae55ac54112a5c978c0c8b7483aa8b8d618ad4 (patch) | |
tree | d1790f605e7490b2068b0fa614526ef2e0849e70 /image.py | |
parent | 9131cb25bb5395bac0fc21faad8284a123189a50 (diff) | |
download | anaconda-5fae55ac54112a5c978c0c8b7483aa8b8d618ad4.tar.gz anaconda-5fae55ac54112a5c978c0c8b7483aa8b8d618ad4.tar.xz anaconda-5fae55ac54112a5c978c0c8b7483aa8b8d618ad4.zip |
multiple cd installs work!!!
Diffstat (limited to 'image.py')
-rw-r--r-- | image.py | 30 |
1 files changed, 26 insertions, 4 deletions
@@ -5,6 +5,8 @@ from installmethod import InstallMethod import iutil import os import isys +import string +from translate import _ class ImageInstallMethod(InstallMethod): @@ -24,18 +26,38 @@ class ImageInstallMethod(InstallMethod): class CdromInstallMethod(ImageInstallMethod): def systemMounted(self, fstab, mntPoint): + self.mntPoint = mntPoint target = "%s/rhinstall-stage2.img" % mntPoint - iutil.copyFile("%s/RedHat/base/stage2.img" % self.tree, target) + iutil.copyFile("%s/RedHat/base/stage2.img" % self.tree, target, + (self.progressWindow, _("Copying File"), + _("Transferring install image to hard drive..."))) isys.makeDevInode("loop0", "/tmp/loop") isys.lochangefd("/tmp/loop", target) + 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"), + _("Please insert disc %d to continue.") % self.currentDisc) + isys.mount("/tmp/cdrom", "/mnt/source", fstype = "iso9660", + readOnly = 1) + + return self.tree + "/RedHat/RPMS/" + h[1000000] + def filesDone(self): # this isn't the exact right place, but it's close enough - target = "%s/rhinstall-stage2.img" % mntPoint + target = "%s/rhinstall-stage2.img" % self.mntPoint os.unlink(target) - def __init__(self, tree): - ImageInstallMethod.__init__(self, tree) + def __init__(self, url, messageWindow, progressWindow): + (self.device, tree) = string.split(url, "/", 1) + self.messageWindow = messageWindow + self.progressWindow = progressWindow + self.currentDisc = 1 + ImageInstallMethod.__init__(self, "/" + tree) class NfsInstallMethod(ImageInstallMethod): |