Example #1
0
 def slotReboot(self):
     
     try:
         yalisys.umount(ctx.consts.target_dir + "/home")
     except:
         pass
     yalisys.umount(ctx.consts.target_dir)
     yalisys.fastreboot()
Example #2
0
def is_windows_boot(partition_path, file_system):
    m_dir = "/tmp/pcheck"
    if not os.path.isdir(m_dir):
        os.makedirs(m_dir)

    try:
        if file_system == "fat32":
            yalisys.mount(partition_path, m_dir, "vfat")
        else:
            yalisys.mount(partition_path, m_dir, file_system)
    except:
        return False

    exist = lambda f: os.path.exists(os.path.join(m_dir, f))

    if exist("boot.ini") or exist("command.com"):
        yalisys.umount(m_dir)
        return True
    else:
        yalisys.umount(m_dir)
        return False
Example #3
0
    def execute(self):

        ctx.screens.disableNext()

        self.info.show()
        self.info.setAlignment(QLabel.AlignCenter)

        #FIXME: this is a dirty and temporary workaround.. will be removed.
#        os.chmod(ctx.consts.target_dir + "/var/tmp", 01777)

        # remove cd...
        w = RebootWidget(self)
        self.dialog = WarningDialog(w, self)
        self.dialog.exec_loop()


        try:
            yalisys.umount(ctx.consts.target_dir + "/home")
        except:
            pass

        yalisys.umount(ctx.consts.target_dir)
        yalisys.fastreboot()