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


Python Hardware.chroot方法代码示例

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


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

示例1: post_install

# 需要导入模块: from hardware.hardware import Hardware [as 别名]
# 或者: from hardware.hardware.Hardware import chroot [as 别名]
    def post_install(self, dest_dir):
        """ Post install commands """
        # Add repos to user's pacman.conf
        path = os.path.join(dest_dir, "etc/pacman.conf")
        self.add_repositories(path)

        Hardware.chroot(["systemctl", "enable", "atieventsd"])
        Hardware.chroot(["systemctl", "enable", "catalyst-hook"])
        Hardware.chroot(["systemctl", "enable", "temp-links-catalyst"])

        Hardware.chroot(["aticonfig", "--initial"], dest_dir)
开发者ID:Antergos,项目名称:Cnchi,代码行数:13,代码来源:catalyst_legacy.py

示例2: post_install

# 需要导入模块: from hardware.hardware import Hardware [as 别名]
# 或者: from hardware.hardware.Hardware import chroot [as 别名]
    def post_install(dest_dir):
        """ Post install commands """
        path = os.path.join(dest_dir, "etc/modules-load.d")
        os.makedirs(path, mode=0o755, exist_ok=True)
        path = os.path.join(dest_dir, "etc/modules-load.d/virtualbox-guest.conf")
        with open(path, 'w') as modules:
            modules.write('# Virtualbox modules added by Cnchi - Antergos Installer\n')
            modules.write("vboxguest\n")
            modules.write("vboxsf\n")
            modules.write("vboxvideo\n")

        Hardware.chroot(["systemctl", "disable", "openntpd"], dest_dir)
        Hardware.chroot(["systemctl", "-f", "enable", "vboxservice"], dest_dir)

        # This fixes bug in virtualbox-guest-modules package
        Hardware.chroot(["depmod", "-a"], dest_dir)
开发者ID:Antergos,项目名称:Cnchi,代码行数:18,代码来源:virtualbox.py

示例3: post_install

# 需要导入模块: from hardware.hardware import Hardware [as 别名]
# 或者: from hardware.hardware.Hardware import chroot [as 别名]
 def post_install(dest_dir):
     """ Post install commands """
     Hardware.chroot(["systemctl", "enable", "vmtoolsd"], dest_dir)
开发者ID:Antergos,项目名称:Cnchi,代码行数:5,代码来源:vmware.py


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