diff options
author | Chris Lumens <clumens@redhat.com> | 2008-06-06 13:14:40 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-06-18 10:44:56 -0400 |
commit | 8b80e29424af1665dbf0438eb15fd2f9b188609b (patch) | |
tree | be8b970ff384077fd3a02ef77f7ddce20e0693ff /image.py | |
parent | aa169c3ad927f909f8747582585f903635ec2e13 (diff) | |
download | anaconda-8b80e29424af1665dbf0438eb15fd2f9b188609b.tar.gz anaconda-8b80e29424af1665dbf0438eb15fd2f9b188609b.tar.xz anaconda-8b80e29424af1665dbf0438eb15fd2f9b188609b.zip |
Support mounting nfsiso sources in mountDirectory.
Diffstat (limited to 'image.py')
-rw-r--r-- | image.py | 22 |
1 files changed, 9 insertions, 13 deletions
@@ -130,22 +130,18 @@ def mountDirectory(methodstr, messageWindow): method = methodstr[3:] (device, fstype, path) = method.split(":", 3) device = method[0:method.index(":")] + + if not device.startswith("/dev/"): + device = "/dev/%s" % device + elif methodstr.startswith("nfsiso:"): + device = methodstr[7:] + fstype = "nfs" else: return - # First check to see if isodir is mounted. - f = open("/proc/mounts", "r") - lines = f.readlines() - f.close() - - if not device.startswith("/dev/"): - device = "/dev/%s" %(device,) - - for l in lines: - s = string.split(l) - if s[0] == device: - # It is, so there's no need to try again. - return + # No need to mount it again. + if os.path.ismount("/mnt/isodir"): + return try: isys.mount(device, "/mnt/isodir", fstype = fstype) |