本文整理汇总了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)
示例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)
示例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)