Debian Codegraph @

debian/discover-data.bug-script

raw
1 #!/bin/sh
2
3 PATH=/sbin:$PATH
4
5 if which lspci > /dev/null 2>&1; then
6 echo lspci: >&3
7 LC_ALL=C lspci -nn >&3
8 printf "\n" >&3
9 fi
10
11 if which lsusb > /dev/null 2>&1; then
12 echo lsusb: >&3
13 (
14 LC_ALL=C lsusb
15 ) | sort >&3
16 printf "\n" >&3
17 fi
18
19 # XXX No idea how to do this with discover v2
20 #echo discover: >&3
21 #discover --format="%m:%V %M\n" all >&3
22
23 if [ -d /sys/bus/pci/devices/ ] ; then
24 echo loaded modules: >&3
25 (
26 cd /sys/bus/pci/devices/
27 for address in * ; do
28 if [ -d "$address/driver/module" ] ; then
29 module=`cd $address/driver/module ; pwd -P | xargs basename`
30 if grep -q "^$module " /proc/modules ; then
31 address=$(echo $address |sed s/0000://)
32 echo "`lspci -n -s $address | tail -n 1 | awk '{print $3}'` $module" >&3
33 fi
34 fi
35 done
36 )
37 echo >&3
38 fi
39
40
41 # Report X settings
42 if which debconf-get-selections > /dev/null 2>&1; then
43 echo X setting: >&3
44 debconf-get-selections | egrep xserver-.*/config/device/driver >&3
45 fi