source: ubiquity/trunk/fuentes/debian/patches/llx_lowlatency_fix_part2.patch

Last change on this file was 4632, checked in by hectorgh, 4 years ago

adding lowlatency kernel to installed system if found in casper

File size: 1.2 KB
  • scripts/install.py

    diff -uNar ubiquity.orig/scripts/install.py ubiquity.mod/scripts/install.py
    old new  
    210210
    211211        return None
    212212
     213    def find_lowlatency_kernel(self):
     214        for f in os.listdir(self.casper_path):
     215            if "vmlinuz" in f and "lowlatency" in f:
     216                syslog.syslog("LLIUREX MOD: Adding lowlatency kernel: %s"%f)
     217                return os.path.join(self.casper_path,f)
     218        return None
     219
    213220    def generate_blacklist(self):
    214221        manifest_remove = os.path.join(self.casper_path,
    215222                                       'filesystem.manifest-remove')
     
    588595                # Construct the unsigned kernel.
    589596                subprocess.check_call(["sbattach", "--remove", target_kernel])
    590597
     598        lkernel = self.find_lowlatency_kernel()
     599        if lkernel:
     600            target = os.path.join(bootdir,lkernel.split("/")[-1])
     601            install_misc.copy_file(self.db, lkernel, target, md5_check)
     602            os.lchown(target, 0, 0)
     603            os.chmod(target, 0o644)
     604
    591605        os.umask(old_umask)
    592606
    593607        self.db.progress('SET', 100)
Note: See TracBrowser for help on using the repository browser.