当前位置: 首页>>代码示例>>Python>>正文


Python Defaults.get_signed_grub_loader方法代码示例

本文整理汇总了Python中kiwi.defaults.Defaults.get_signed_grub_loader方法的典型用法代码示例。如果您正苦于以下问题:Python Defaults.get_signed_grub_loader方法的具体用法?Python Defaults.get_signed_grub_loader怎么用?Python Defaults.get_signed_grub_loader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kiwi.defaults.Defaults的用法示例。


在下文中一共展示了Defaults.get_signed_grub_loader方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _setup_secure_boot_efi_image

# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_signed_grub_loader [as 别名]
 def _setup_secure_boot_efi_image(self, lookup_path):
     """
     Provide the shim loader and the shim signed grub2 loader
     in the required boot path. Normally this task is done by
     the shim-install tool. However, shim-install does not exist
     on all distributions and the script does not operate well
     in e.g CD environments from which we generate live and/or
     install media. Thus shim-install is used if possible at
     install time of the bootloader because it requires access
     to the target block device. In any other case this setup
     code should act as the fallback solution
     """
     log.warning(
         '--> Running fallback setup for shim secure boot efi image'
     )
     if not lookup_path:
         lookup_path = self.root_dir
     shim_image = Defaults.get_shim_loader(lookup_path)
     if not shim_image:
         raise KiwiBootLoaderGrubSecureBootError(
             'Microsoft signed shim loader not found'
         )
     grub_image = Defaults.get_signed_grub_loader(lookup_path)
     if not grub_image:
         raise KiwiBootLoaderGrubSecureBootError(
             'Shim signed grub2 efi loader not found'
         )
     Command.run(
         ['cp', shim_image, self._get_efi_image_name()]
     )
     Command.run(
         ['cp', grub_image, self.efi_boot_path]
     )
开发者ID:adrianschroeter,项目名称:kiwi,代码行数:35,代码来源:grub2.py


注:本文中的kiwi.defaults.Defaults.get_signed_grub_loader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。