diff options
author | Erik Troan <ewt@redhat.com> | 1999-08-19 22:13:55 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-08-19 22:13:55 +0000 |
commit | bf56732d9e92d8c6db53c5f4a6e4d77a096ebffa (patch) | |
tree | b790d619ee5573a6e2d0b343314d54f0fb9617f7 /harddrive.py | |
parent | 6a5bf8e0d74524934f26ae6137442f5f6f506660 (diff) | |
download | anaconda-bf56732d9e92d8c6db53c5f4a6e4d77a096ebffa.tar.gz anaconda-bf56732d9e92d8c6db53c5f4a6e4d77a096ebffa.tar.xz anaconda-bf56732d9e92d8c6db53c5f4a6e4d77a096ebffa.zip |
*** empty log message ***
Diffstat (limited to 'harddrive.py')
-rw-r--r-- | harddrive.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/harddrive.py b/harddrive.py new file mode 100644 index 000000000..ec892eb64 --- /dev/null +++ b/harddrive.py @@ -0,0 +1,43 @@ +# Install method for disk image installs (CD & NFS) + +from comps import ComponentSet, HeaderList +import isys + +class InstallMethod: + + def readComps(self, hdlist): + isys.mount('/tmp/' + self.device, "/tmp/hdimage"); + cs = ComponentSet('i386', "/tmp/hdimage/" + self.tree + + '/RedHat/base/comps', hdlist) + isys.umount("/tmp/hdimage") + return cs + + def getFilename(self, h): + return self.tree + "/RedHat/RPMS/" + h[1000000] + + def readHeaders(self): + isys.mount('/tmp/' + self.device, "/tmp/hdimage"); + hl = HeaderList("/tmp/hdimage/" + self.path + "/RedHat/base/hdlist") + isys.umount("/tmp/hdimage") + return hl + + def targetFstab(self, fstab): + self.isMounted = 0 + for (device, fsystem, reformat) in fstab.items(): + if (device == self.device): + self.isMounted = 1 + self.tree = "/mnt/sysimage" + fsystem + "/" + self.path + self.needsUnmount = 0 + + if (not self.isMounted): + isys.mount('/tmp/' + self.device, "/tmp/hdimage"); + self.tree = "/tmp/hdimage/" + self.path + self.needsUnmount = 1 + + def filesDone(self): + if (self.needsUnmount): + isys.umount("/tmp/hdimage") + + def __init__(self, device, path): + self.device = device + self.path = path |