本文整理汇总了Python中hardware.hardware.Hardware类的典型用法代码示例。如果您正苦于以下问题:Python Hardware类的具体用法?Python Hardware怎么用?Python Hardware使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Hardware类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: post_install
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
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: __init__
def __init__(self):
Hardware.__init__(self, CLASS_NAME, CLASS_ID, VENDOR_ID, DEVICES)
示例4: __init__
def __init__(self):
Hardware.__init__(self)
示例5: post_install
def post_install(dest_dir):
""" Post install commands """
Hardware.chroot(["systemctl", "enable", "vmtoolsd"], dest_dir)
示例6: __init__
def __init__(self):
Hardware.__init__(self, CLASS_NAME, CLASS_ID, VENDOR_ID, DEVICES, PRIORITY, ENABLED)