summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-08-03 16:25:40 +0000
committerErik Troan <ewt@redhat.com>2000-08-03 16:25:40 +0000
commit789a84e5a29874dd58af85f5bc818aad2072fbf2 (patch)
tree2e26c7b89fcd50f896f7beff02f0f75e9d29390a /image.py
parent24dcc6c27de44ec6e6970f9af9121cd9c1de2066 (diff)
downloadanaconda-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.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/image.py b/image.py
index fd879dfde..baad5fbaf 100644
--- a/image.py
+++ b/image.py
@@ -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):