[et-mgmt-tools] [PATCH] Fix paravirt install by NFS

Nobuhiro Itou fj0873gn at aa.jp.fujitsu.com
Thu Mar 15 11:13:19 UTC 2007


Hi,

The paravirt domain cannot be installed by NFS.
The attached patch adds to solve this problem.

Signed-off-by: Nobuhiro Itou <fj0873gn at aa.jp.fujitsu.com>


Thanks,
Nobuhiro Itou.


diff -r 057e8c1b54df virtinst/DistroManager.py
--- a/virtinst/DistroManager.py Wed Mar 14 16:11:43 2007 -0400
+++ b/virtinst/DistroManager.py Thu Mar 15 19:21:09 2007 +0900
@@ -101,10 +101,10 @@ class MountedImageFetcher(ImageFetcher):
                 cmd = ["mount", "-o", "ro", self.location, self.mntdir]
             else:
                 cmd = ["mount", "-o", "ro,loop", self.location, self.mntdir]
-            ret = subprocess.call(cmd)
-            if ret != 0:
-                self.cleanupLocation()
-                return False
+        ret = subprocess.call(cmd)
+        if ret != 0:
+            self.cleanupLocation()
+            return False
         return True

     def cleanupLocation(self):
@@ -123,7 +123,7 @@ class MountedImageFetcher(ImageFetcher):
             base = os.path.basename(filename)
             try:
                 src = self.mntdir + "/" + filename
-                if stat.S_ISDIR(os.stat(src)):
+                if stat.S_ISDIR(os.stat(src)[stat.ST_MODE]):
                     pass
                 else:
                     file = open(src, "r")




More information about the et-mgmt-tools mailing list