tazpanel diff hardware.cgi @ rev 597
hardware.cgi: read pci.ids (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Aug 04 12:46:40 2016 +0200 (2016-08-04) |
parents | 05203af2f9b4 |
children | 8afba0061740 |
line diff
1.1 --- a/hardware.cgi Thu Aug 04 11:52:15 2016 +0200 1.2 +++ b/hardware.cgi Thu Aug 04 12:46:40 2016 +0200 1.3 @@ -80,11 +80,11 @@ 1.4 <tbody> 1.5 EOT 1.6 lspci | while read a b c id ; do 1.7 - echo -n "$a " 1.8 if [ $b != "Class" ] || [ ! -s /usr/share/misc/pci.ids.gz ]; then 1.9 - echo "$b $c $id" 1.10 + echo "X$a $b $c $id" 1.11 continue 1.12 fi 1.13 + echo -n "$a " 1.14 zcat /usr/share/misc/pci.ids.gz | \ 1.15 awk -va=${c:0:2} -vb=${c:2:2} -vh=${id:0:4} -vl=${id:5:4} '{ 1.16 if ($1 == "C" && $2 == a) class=substr($0,5) 1.17 @@ -96,7 +96,7 @@ 1.18 } END { print class ": " name }' 1.19 done | sed 's| |</td><td>|; 1.20 s|: |</td><td>|; 1.21 - s|^\([^<]*\)|<a href="?lspci=\1">\1</a>|; 1.22 + s|^X\([^<]*\)|<a href="?lspci=\1">\1</a>|; 1.23 s|^.*$|<tr><td>\0</td></tr>|' 1.24 echo "</tbody></table>" 1.25 }