summaryrefslogtreecommitdiffstats
path: root/harddrive.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-03-28 17:46:34 +0000
committerMike Fulbright <msf@redhat.com>2003-03-28 17:46:34 +0000
commitafd710d00ef3c4cda70ade00cef3bc0c94e5c9be (patch)
tree21540e2824357252edfeecea1620a0f78ec4b7f5 /harddrive.py
parent30504427969ce7d341b21905183d39c7e2788c1d (diff)
downloadanaconda-afd710d00ef3c4cda70ade00cef3bc0c94e5c9be.tar.gz
anaconda-afd710d00ef3c4cda70ade00cef3bc0c94e5c9be.tar.xz
anaconda-afd710d00ef3c4cda70ade00cef3bc0c94e5c9be.zip
now we loopback mount stage 2 for harddrive this code is not needed
Diffstat (limited to 'harddrive.py')
-rw-r--r--harddrive.py41
1 files changed, 4 insertions, 37 deletions
diff --git a/harddrive.py b/harddrive.py
index 7d4045d81..630a56994 100644
--- a/harddrive.py
+++ b/harddrive.py
@@ -1,7 +1,7 @@
#
# harddrive.py - Install method for hard drive installs
#
-# Copyright 1999-2002 Red Hat, Inc.
+# Copyright 1999-2003 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -47,8 +47,6 @@ class HardDriveInstallMethod(InstallMethod):
if (self.mediaIsMounted):
raise SystemError, "trying to mount already-mounted iso image!"
- self.mountDirectory()
-
isoImage = self.isoDir + '/' + self.path + '/' + self.discImages[cdNum]
isys.makeDevInode("loop3", "/tmp/loop3")
@@ -63,38 +61,8 @@ class HardDriveInstallMethod(InstallMethod):
isys.umount(self.tree)
isys.makeDevInode("loop3", "/tmp/loop3")
isys.unlosetup("/tmp/loop3")
- self.umountDirectory()
- self.tree = None
self.mediaIsMounted = 0
- # This mounts the directory containing the iso images, and places the
- # mount point in self.isoDir. It's only used directly by __init__;
- # everything else goes through mountMedia
- def mountDirectory(self):
- if (self.isoDirIsMounted):
- raise SystemError, "trying to mount already-mounted image!"
-
- f = open("/proc/mounts", "r")
- l = f.readlines()
- f.close()
-
- for line in l:
- s = string.split(line)
- if s[0] == "/dev/" + self.device:
- self.isoDir = s[1] + "/"
- return
-
- isys.mount(self.device, "/tmp/isodir", fstype = self.fstype,
- readOnly = 1);
- self.isoDir = "/tmp/isodir/"
- self.isoDirIsMounted = 1
-
- def umountDirectory(self):
- if self.isoDirIsMounted:
- isys.umount(self.isoDir)
- self.tree = None
- self.isoDirIsMounted = 0
-
def readCompsViaMethod(self, hdlist):
self.mountMedia(1)
fname = self.findBestFileMatch(self.tree, 'comps.xml')
@@ -161,13 +129,12 @@ class HardDriveInstallMethod(InstallMethod):
self.path = path
self.fstype = type
self.fnames = {}
- self.isoDirIsMounted = 0
self.mediaIsMounted = 0
self.messageWindow = messageWindow
+ # assumes that loader set this up properly as /tmp/isodir
+ self.isoDir = "/tmp/hdimage"
+
# Go ahead and poke through the directory looking for interesting
# iso images
- self.mountDirectory()
self.discImages = findIsoImages(self.isoDir + '/' + self.path, messageWindow)
-
- self.umountDirectory()