summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-06-06 13:14:40 -0400
committerChris Lumens <clumens@redhat.com>2008-06-18 10:44:56 -0400
commit8b80e29424af1665dbf0438eb15fd2f9b188609b (patch)
treebe8b970ff384077fd3a02ef77f7ddce20e0693ff /image.py
parentaa169c3ad927f909f8747582585f903635ec2e13 (diff)
downloadanaconda-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.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/image.py b/image.py
index 8b6287771..45779ef21 100644
--- a/image.py
+++ b/image.py
@@ -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)