Commits

Uelsk8s committed 27a441f

testing from iso on partition

Comments (0)

Files changed (5)

vinstall/backend/installmedia.py

         for partition in partitions:
             needs_umount = False
             if not partition.is_mounted():
-                partition.mount(dev_mountpoint)
+                partition.mount(partition.mountpoint)
                 needs_umount = True
             if is_install_media(partition.mountpoint):
                 config = parse_config(partition.mountpoint)

vinstall/backend/media.py

 
     def __init__(self, device_path):
         """Initializes a Media object fro the device path."""
-
-        self.mountpoint = None
+	mntpoint = device_path.split("/")[2] 
+	mntpoint =  "/mnt/" + mntpoint         
+        if not os.path.exists(mntpoint):
+            os.mkdir(mntpoint)
+	self.mountpoint = mntpoint 
         self.device_path = device_path
         if self.is_mounted():
            for line in open("/etc/mtab"):

vinstall/controller/bootloader.py

         """
         yield self.set_bind_mounts, tuple(), "Mounting pseudo filesystems"
         yield self.install_bootloader, (bootloader, target), "Installing bootloader"
+        yield self.clear_bind_mounts, tuple(), "Clearing bind mounts"
 
     def install_bootloader(self, bloader, target):
         """Install the bootloader
             cmd = "mount -o bind /%s /mnt/TARGET/%s" % (point, point)
             subprocess.check_call(cmd.split())
 
+    def clear_bind_mounts(self):
+        """Clear the mountpoints that were mounted for the configuration
+
+        """
+        if not self._check_continue():
+            return
+
+        for mpoint in ("sys","proc","dev"):
+            cmd = "umount -f /mnt/TARGET/%s" % mpoint
+            subprocess.check_call(cmd.split())
+
 

vinstall/controller/packages.py

             os.mkdir(mountpoint)
         install_media = self.config["install_media"]
         if install_media.is_iso():
+            if not os.path.exists(install_media.path):
+		print "mount container here"
             utils.mountiso(install_media.path, mountpoint)
         else:
             utils.mount(install_media.path, mountpoint, filesystem="auto")

vinstall/controller/usersetup.py

             yield self.create_user_account, (username, password), "Setting passwords"
         yield self.fstab, tuple(), "Creating fstab"
         yield self.setup_services, tuple(), "Setting up services"
-        yield self.clear_bind_mounts, tuple(), "Clearing bind mounts"
 
     def set_root_password(self, rootpassword):
         """Set the root password
                 if svc.name in s:
                     svc.enable(runlevel)
 
-    def clear_bind_mounts(self):
-        """Clear the mountpoints that were mounted for the configuration
-
-        """
-        if not self._check_continue():
-            return
-
-        for mpoint in ("sys","proc","dev"):
-            cmd = "umount -f /mnt/TARGET/%s" % mpoint
-            subprocess.check_call(cmd.split())
-
     def _check_continue(self):
         return 'I_MEAN_IT' in os.environ
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.