slitaz-tools rev 413
fix tazhw: multiple *-slitaz dir affects usbmap output
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Tue Nov 24 12:39:28 2009 +0000 (2009-11-24) |
parents | 235c803f046a |
children | 5a34e02fb165 |
files | tinyutils/tazhw |
line diff
1.1 --- a/tinyutils/tazhw Tue Nov 24 12:27:47 2009 +0000 1.2 +++ b/tinyutils/tazhw Tue Nov 24 12:39:28 2009 +0000 1.3 @@ -120,8 +120,8 @@ 1.4 cat /proc/bus/usb/devices | grep "Vendor" | while read line ; do 1.5 ID=`echo "$line" | awk '{ print $2,$3 }' | sed 's/ / /' | \ 1.6 sed 's/Vendor=/0x/' | sed 's/ProdID=/0x/'` 1.7 - if grep -q "$ID" /lib/modules/*-slitaz/modules.usbmap; then 1.8 - mod=`grep "$ID" /lib/modules/*-slitaz/modules.usbmap | \ 1.9 + if grep -q "$ID" /lib/modules/`uname -r`/modules.usbmap; then 1.10 + mod=`grep "$ID" /lib/modules/$(uname -r)/modules.usbmap | \ 1.11 awk '{ print $1 }'` 1.12 prod=`grep -A 2 "$line" /proc/bus/usb/devices | grep Product | \ 1.13 cut -d "=" -f 2`