diff options
author | Erik Troan <ewt@redhat.com> | 2000-08-03 16:25:40 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-08-03 16:25:40 +0000 |
commit | 789a84e5a29874dd58af85f5bc818aad2072fbf2 (patch) | |
tree | 2e26c7b89fcd50f896f7beff02f0f75e9d29390a /image.py | |
parent | 24dcc6c27de44ec6e6970f9af9121cd9c1de2066 (diff) | |
download | anaconda-789a84e5a29874dd58af85f5bc818aad2072fbf2.tar.gz anaconda-789a84e5a29874dd58af85f5bc818aad2072fbf2.tar.xz anaconda-789a84e5a29874dd58af85f5bc818aad2072fbf2.zip |
finished code to put loopback filesystem on fs with the most free space
Diffstat (limited to 'image.py')
-rw-r--r-- | image.py | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -35,14 +35,15 @@ class CdromInstallMethod(ImageInstallMethod): if changeloop == 0: return - self.mntPoint = fstab.filesystemSpace()[0][0] + self.loopbackFile = mntPoint + fstab.filesystemSpace()[0][0] + \ + "/rhinstall-stage2.img" - 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, + self.loopbackFile, (self.progressWindow, _("Copying File"), _("Transferring install image to hard drive..."))) isys.makeDevInode("loop0", "/tmp/loop") - isys.lochangefd("/tmp/loop", target) + isys.lochangefd("/tmp/loop", self.loopbackFile) def getFilename(self, h): if h[1000002] == None: @@ -78,12 +79,11 @@ class CdromInstallMethod(ImageInstallMethod): return self.tree + "/RedHat/RPMS/" + h[1000000] def filesDone(self): - if not self.mntPoint: return + if not self.loopbackFile: return try: # this isn't the exact right place, but it's close enough - target = "%s/rhinstall-stage2.img" % self.mntPoint - os.unlink(target) + os.unlink(self.loopbackFile) except SystemError: pass @@ -100,7 +100,7 @@ class CdromInstallMethod(ImageInstallMethod): self.messageWindow = messageWindow self.progressWindow = progressWindow self.currentDisc = 1 - self.mntPoint = None + self.loopbackFile = None ImageInstallMethod.__init__(self, "/" + tree) class NfsInstallMethod(ImageInstallMethod): |