summaryrefslogtreecommitdiffstats
path: root/instdata.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-12-04 19:58:09 -0500
committerChris Lumens <clumens@redhat.com>2007-12-05 10:30:46 -0500
commitd1300e4c00a4e61097cdd7141112ec3a6894c494 (patch)
tree21cf7cb9120ef4936760d46d0c387296474b1d8a /instdata.py
parent52a9331a20f82fd6f3aef18492fd2af61f830bdf (diff)
downloadanaconda-d1300e4c00a4e61097cdd7141112ec3a6894c494.tar.gz
anaconda-d1300e4c00a4e61097cdd7141112ec3a6894c494.tar.xz
anaconda-d1300e4c00a4e61097cdd7141112ec3a6894c494.zip
Begin removing references to anaconda.method and anaconda.methodstr.
Remove method references from the Anaconda object, along with various support functions that import methods and return instances of methods. This also removes method instances from the backend.
Diffstat (limited to 'instdata.py')
-rw-r--r--instdata.py31
1 files changed, 1 insertions, 30 deletions
diff --git a/instdata.py b/instdata.py
index 784fdb65f..cdb0574b4 100644
--- a/instdata.py
+++ b/instdata.py
@@ -212,36 +212,7 @@ class InstallData:
f.write("install\n");
# figure out the install method and write out a line
- if self.methodstr.startswith('ftp://') or self.methodstr.startswith('http://'):
- f.write("url --url %s\n" % urllib.unquote(self.methodstr))
- elif self.methodstr.startswith('cdrom://'):
- f.write("cdrom\n")
- elif self.methodstr.startswith('hd://'):
- pidx = string.find(self.methodstr, '//') + 2
- didx = string.find(self.methodstr[pidx:], '/')
- partition = string.split(self.methodstr[pidx:pidx+didx], ':')[0]
- dir = self.methodstr[pidx+didx+1:]
- f.write("harddrive --partition=%s --dir=%s\n" % (partition, dir))
- elif self.methodstr.startswith('nfs:/') or self.methodstr.startswith('nfsiso:'):
- (method, tmpmntpt) = string.split(self.methodstr, ':')
- # clean up extra '/' at front
- if tmpmntpt[1] == '/':
- rawmntpt = tmpmntpt[1:]
- else:
- rawmntpt = tmpmntpt
- mntpt = os.path.normpath(rawmntpt)
-
- # find mntpt in /proc/mounts so we can get NFS server info
- fproc = open("/proc/mounts", "r")
- lines = fproc.readlines()
- fproc.close()
-
- for l in lines:
- minfo = string.split(l)
- if len(minfo) > 1 and minfo[1] == mntpt and minfo[0].find(":") != -1:
- (srv, dir) = minfo[0].split(':')
- f.write("nfs --server=%s --dir=%s\n" % (srv, dir))
- break
+ self.anaconda.writeMethodstr(f)
if self.instClass.skipkey:
f.write("key --skip\n")