Пример #1
0
 def get_reboot_tasklist(self):
     tasks = [
         Task(self.reboot, description=_("Rebooting")),
     ]
     tasklist = ThreadedTaskList(description=_("Rebooting"), tasks=tasks)
     return tasklist
Пример #2
0
 def get_installation_tasklist(self):
     self.cache_cd_path()
     dimage = self.info.distro.diskimage
     # don't use diskimage for a FAT32 target directory
     if dimage and not self.cd_path and not self.iso_path and not self.info.target_drive.is_fat(
     ):
         tasks = [
             Task(self.select_target_dir,
                  description=_("Selecting the target directory")),
             Task(self.create_dir_structure,
                  description=_("Creating the directories")),
             Task(self.create_uninstaller,
                  description=_("Creating the uninstaller")),
             Task(self.create_preseed_diskimage,
                  description=_("Creating a preseed file")),
             Task(self.get_diskimage,
                  description=_("Retrieving installation files")),
             Task(self.extract_diskimage, description=_("Extracting")),
             Task(self.choose_disk_sizes,
                  description=_("Choosing disk sizes")),
             Task(self.expand_diskimage, description=_("Expanding")),
             Task(self.create_swap_diskimage,
                  description=_("Creating virtual memory")),
             Task(self.modify_bootloader,
                  description=_("Adding a new bootloader entry")),
             Task(self.diskimage_bootloader,
                  description=_("Installing the bootloader")),
         ]
     else:
         tasks = [
             Task(self.select_target_dir,
                  description=_("Selecting the target directory")),
             Task(self.create_dir_structure,
                  description=_("Creating the installation directories")),
             Task(self.uncompress_target_dir,
                  description=_("Uncompressing files")),
             Task(self.create_uninstaller,
                  description=_("Creating the uninstaller")),
             Task(self.copy_installation_files,
                  description=_("Copying installation files")),
             Task(self.get_iso,
                  description=_("Retrieving installation files")),
             Task(self.extract_kernel,
                  description=_("Extracting the kernel")),
             Task(self.choose_disk_sizes,
                  description=_("Choosing disk sizes")),
             Task(self.create_preseed,
                  description=_("Creating a preseed file")),
             Task(self.modify_bootloader,
                  description=_("Adding a new bootloader entry")),
             Task(self.modify_grub_configuration,
                  description=_("Setting up installation boot menu")),
             Task(self.create_virtual_disks,
                  description=_("Creating the virtual disks")),
             Task(self.uncompress_files,
                  description=_("Uncompressing files")),
             Task(self.eject_cd, description=_("Ejecting the CD")),
         ]
     description = _("Installing %(distro)s-%(version)s") % dict(
         distro=self.info.distro.name, version=self.info.version)
     tasklist = ThreadedTaskList(description=description, tasks=tasks)
     return tasklist