In /var/log/OPSI/Bootimage /
I have a log file of the tests yesterday. Nothing poour practice this morning
Here are the contents of /opt/pcbin/install/winxppro/ show_drivers.py
#!/usr/bin/python
import sys, os
from OPSI.Backend.BackendManager import BackendManager
COLOR_NORMAL = '\033[0;0;0m'
COLOR_LIGHT_RED = '\033[1;31;40m'
COLOR_LIGHT_GREEN = '\033[1;32;40m'
COLOR_LIGHT_WHITE = '\033[1;37;40m'
COLOR_LIGHT_YELLOW = '\033[1;33;40m'
def findInfFiles(directory):
files = []
entries = os.listdir(directory)
for entry in entries:
if ( (entry == '.') or (entry == '..') ):
continue
if os.path.isdir(os.path.join(directory, entry)):
files.extend(
findInfFiles(
os.path.join(directory, entry) ) )
elif entry.lower().endswith('.inf'):
files.append( os.path.join(directory, entry) )
return files
pciids = os.path.join( os.path.dirname(os.path.abspath(sys.argv[0])), 'drivers', 'pciids' )
usbids = os.path.join( os.path.dirname(os.path.abspath(sys.argv[0])), 'drivers', 'usbids' )
hdaudioids = os.path.join( os.path.dirname(os.path.abspath(sys.argv[0])), 'drivers', 'hdaudioids' )
additional = os.path.join( os.path.dirname(os.path.abspath(sys.argv[0])), 'drivers', 'drivers', 'additional' )
buildin = os.path.join( os.path.dirname(os.path.abspath(sys.argv[0])), 'drivers', 'drivers', 'buildin' )
productId = os.path.basename( os.path.dirname(os.path.abspath(sys.argv[0])) )
if (len(sys.argv) < 2) or (sys.argv[1].startswith('-')):
print "\nUsage: %s <host-id>\n" % os.path.basename(sys.argv[0])
sys.exit(1)
bm = BackendManager(configFile = '/etc/opsi/backendManager.d', authRequired = False)
hostId = sys.argv[1]
if (hostId.find('.') == -1):
hostId += '.' + bm.getDomain()
hwInfo = bm.getHardwareInformation_hash(hostId)
productProperties = bm.getProductProperties_hash(productId, hostId)
bm.exit()
print ""
if not hwInfo:
print "No hardwareinfo found for host '%s', please run 'hwinvent' or 'hwaudit' first!\n" % hostId
sys.exit(1)
for type in ('PCI', 'USB', 'HDAUDIO'):
devices = []
baseDir = ''
if (type == 'PCI'):
devices = hwInfo.get('PCI_DEVICE', [])
baseDir = pciids
if not devices:
continue
print "PCI-Devices"
elif (type == 'USB'):
devices = hwInfo.get('USB_DEVICE', [])
baseDir = usbids
if not devices:
continue
print "USB-Devices"
elif (type == 'HDAUDIO'):
devices = hwInfo.get('HDAUDIO_DEVICE', [])
baseDir = hdaudioids
if not devices:
continue
print "HD-Audio-Devices"
for device in devices:
(vendorId, deviceId) = (device.get('vendorId', device.get('vendorid', '')).upper(), device.get('deviceId', device.get('deviceid', '')).upper())
if not vendorId or not deviceId:
continue
print " [%s%s, %s%s]" % (COLOR_LIGHT_WHITE, device.get('vendor') or 'Unknown vendor', device.get('name') or 'Unknown device', COLOR_NORMAL)
if not os.path.exists( os.path.join(baseDir, vendorId) ):
print " %sNo driver - vendor directory '%s' not found%s" % (COLOR_LIGHT_RED, os.path.join(baseDir, vendorId), COLOR_NORMAL)
continue
if not os.path.exists( os.path.join(baseDir, vendorId, deviceId) ):
print " %sNo driver - device directory '%s' not found%s" % (COLOR_LIGHT_RED, os.path.join(baseDir, vendorId, deviceId), COLOR_NORMAL)
continue
target = os.path.abspath( os.path.join(baseDir, vendorId, os.readlink( os.path.join(baseDir, vendorId, deviceId) ) ) )
if (target == buildin):
print " %sUsing build-in windows driver%s" % (COLOR_LIGHT_YELLOW, COLOR_NORMAL)
else:
print " %s%s%s" % (COLOR_LIGHT_GREEN, target, COLOR_NORMAL)
print ""
additionalDrivers = productProperties.get('additional_drivers','')
if additionalDrivers:
print "Additional drivers"
for additionalDriver in additionalDrivers.split(','):
additionalDriver = additionalDriver.strip()
if not additionalDriver:
continue
target = os.path.abspath( os.path.join(additional, additionalDriver) )
print " [%s%s%s]" % (COLOR_LIGHT_WHITE, additionalDriver, COLOR_NORMAL)
if not os.path.isdir(target):
print " %sDriver directory '%s' not found%s" % (COLOR_LIGHT_RED, target, COLOR_NORMAL)
continue
infFiles = findInfFiles(target)
if not infFiles:
print " %sNo drivers found in directory '%s'%s" % (COLOR_LIGHT_RED, target, COLOR_NORMAL)
continue
dirnames = []
for infFile in infFiles:
dirname = os.path.dirname(infFile)
if os.path.islink(dirname):
if os.path.islink(target):
dirname = os.path.abspath( os.path.join(os.path.dirname(target), os.readlink(dirname)) )
else:
dirname = os.path.abspath( os.path.join(target, os.readlink(dirname)) )
if not dirname in dirnames:
print " %s%s%s" % (COLOR_LIGHT_GREEN, dirname, COLOR_NORMAL)
dirnames.append(dirname)
print ""
I did not add driver
It is a Windows XP Pro SP3
Thank you