[PATCH] Support mounting nfsiso sources in mountDirectory.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 image.py |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/image.py b/image.py
index 8b62877..45779ef 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)
-- 
1.5.5.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux