This repository has been archived by the owner on May 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 102
/
vmware.py
57 lines (48 loc) · 1.68 KB
/
vmware.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# vmware.py
#
# Copyright © 2013-2018 Antergos
#
# This file is part of Cnchi.
#
# Cnchi is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Cnchi is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# The following additional terms are in effect as per Section 7 of the license:
#
# The preservation of all legal notices and author attributions in
# the material or in the Appropriate Legal Notices displayed
# by works containing it is required.
#
# You should have received a copy of the GNU General Public License
# along with Cnchi; If not, see <http://www.gnu.org/licenses/>.
""" Vmware driver installation """
try:
from hardware.hardware import Hardware
except ImportError:
from hardware import Hardware
CLASS_NAME = "Vmware"
CLASS_ID = ""
VENDOR_ID = "0x15ad"
DEVICES = ["0x0405", "0x0710"]
class Vmware(Hardware):
""" Vmware tools and drivers """
def __init__(self):
Hardware.__init__(self, CLASS_NAME, CLASS_ID, VENDOR_ID, DEVICES)
@staticmethod
def get_packages():
""" Get all required packages """
return ["xf86-video-vmware", "xf86-input-vmmouse", "open-vm-tools"]
@staticmethod
def post_install(dest_dir):
""" Post install commands """
Hardware.chroot(["systemctl", "enable", "vmtoolsd"], dest_dir)