Rodrigo Bistolfi avatar Rodrigo Bistolfi committed 262e34c

Moved bind mounts clearing to the end

Comments (0)

Files changed (2)

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
+
+        """
+        for mpoint in ("sys","proc","dev"):
+            cmd = "umount -f /mnt/TARGET/%s" % mpoint
+            subprocess.check_call(cmd.split())
 

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.