Beispiel #1
0
def get_drivers():
    paths = [
        '{vineyard_path}/lib'.format(vineyard_path = common.ENV['VINEYARDPATH']),
        '/usr/lib',
        '/usr/lib32',
        '/usr/local/lib',
        '/usr/local/lib32'
    ]
    drivers_1 = util.get_command_output("grep -l -e 'winmm' %s" %
        ' '.join('%s/wine/wine*.drv.so' % i for i in paths), shell=True, dont_parse_command=True)
    drivers_2 = util.get_command_output("grep -l -e 'wave' %s" %
        ' '.join('%s/wine/wine*.drv.so' % i for i in paths), shell=True, dont_parse_command=True)
    return list(set(drivers_1.split('\n')) & set(drivers_2.split('\n')))
Beispiel #2
0
def get_drivers():
    paths = [
        '{vineyard_path}/lib'.format(vineyard_path=common.ENV['VINEYARDPATH']),
        '/usr/lib', '/usr/lib32', '/usr/local/lib', '/usr/local/lib32'
    ]
    drivers_1 = util.get_command_output("grep -l -e 'winmm' %s" %
                                        ' '.join('%s/wine/wine*.drv.so' % i
                                                 for i in paths),
                                        shell=True,
                                        dont_parse_command=True)
    drivers_2 = util.get_command_output("grep -l -e 'wave' %s" %
                                        ' '.join('%s/wine/wine*.drv.so' % i
                                                 for i in paths),
                                        shell=True,
                                        dont_parse_command=True)
    return list(set(drivers_1.split('\n')) & set(drivers_2.split('\n')))
Beispiel #3
0
def get_system_info_cdrom():
    if os.path.exists("/proc/sys/dev/cdrom/info"):
        location = util.get_command_output(("grep", "drive name:", "/proc/sys/dev/cdrom/info"))
        location = "/dev/%s" % location.split("\t")[-1].strip()
        return location
    else:
        return None
Beispiel #4
0
def get_system_info_cdrom():
    if os.path.exists('/proc/sys/dev/cdrom/info'):
        location = util.get_command_output(('grep', 'drive name:', '/proc/sys/dev/cdrom/info'))
        location = '/dev/%s' % location.split("\t")[-1].strip()
        return location
    else:
        return None
Beispiel #5
0
def get_system_info_floppy():
    """ This is based on /var/log/dmesg files found on Google,
    but I don't own a floppy drive, so I don't know if it actually works """
    location = util.get_command_output(("grep", "-i", "floppy", "/var/log/dmesg"))
    if len(location):
        location = re.search("(?m)^[Ff]loppy drive.*?: (\w+) ", location)
        if location:
            location = "/dev/%s" % location.groups()[0]
            if os.path.exists(location):
                return location
            else:
                location = "/dev/%s/%s" % (location[:2], location[-1])
                if os.path.exists(location):
                    return location
    return None
Beispiel #6
0
def get_system_info_floppy():
    """ This is based on /var/log/dmesg files found on Google,
    but I don't own a floppy drive, so I don't know if it actually works """
    location = util.get_command_output(('grep', '-i', 'floppy', '/var/log/dmesg'))
    if len(location):
        location = re.search('(?m)^[Ff]loppy drive.*?: (\w+) ', location)
        if location:
            location = '/dev/%s' % location.groups()[0]
            if os.path.exists(location):
                return location
            else:
                location = '/dev/%s/%s' % (location[:2], location[-1])
                if os.path.exists(location):
                    return location
    return None