Commits

Rodrigo Bistolfi committed ccf04ee

Moved writting vector-version before bootloader and after pkg install

Comments (0)

Files changed (2)

vinstall/controller/packages.py

             yield self.installpkg, (package,), "Installing %s" % package.split("/")[-1]
         yield self.postinstall, tuple(), "Installing setup routines"
         yield self.install_kernel, tuple(), "Installing Linux kernel"
+        yield self.vector_version, tuple(), "Writting /etc/vector-version"
 
     def packages(self, bulks):
         """Return packages to be installed by chaining required packages with
                 else:
                     print "WARNING: missing package", packagename
 
+    def vector_version(self):
+        """write /etc/vector-version based on the information
+        in VINSTALL.INI
+
+        """
+        if not self._check_continue():
+            return
+
+        install_media = self.config["install_media"]
+        distro = install_media.config.get("general", "distro").replace("\"", "")
+        version = install_media.config.get("general", "version").replace("\"", "")
+        build_date = install_media.config.get("general",
+                "build_date").replace("\"", "")
+        vector_version =  "%s built on %s\n" % (version, build_date)
+        with open("/mnt/TARGET/etc/vector-version", 'w') as f:
+            f.write(vector_version)
+
     def mount_source(self):
         """Mount the install media, needed for looking for available packages
 

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.vector_version, tuple(), "Writting /etc/vector-version"
         yield self.clear_bind_mounts, tuple(), "Clearing bind mounts"
 
     def set_root_password(self, rootpassword):
                 if svc.name in s:
                     svc.enable(runlevel)
 
-    def vector_version(self):
-        """write /etc/vector-version based on the information
-        in VINSTALL.INI
-
-        """
-        print "Writing vector-version"
-
-        if not self._check_continue():
-            return
-
-        install_media = self.config["install_media"]
-        distro = install_media.config.get("general", "distro").replace("\"", "")
-        version = install_media.config.get("general", "version").replace("\"", "")
-        build_date = install_media.config.get("general",
-                "build_date").replace("\"", "")
-        vector_version =  "%s built on %s\n" % (version, build_date)
-        with open("/mnt/TARGET/etc/vector-version", 'w') as f:
-            f.write(vector_version)
-
-    def clear_bind_mounts(self):
+   def clear_bind_mounts(self):
         """Clear the mountpoints that were mounted for the configuration
 
         """