probenic.sh: add usb support for kernel 3.10.
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 2 Sep 2013 08:55:49 +0000 (10:55 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 2 Sep 2013 08:55:49 +0000 (10:55 +0200)
src/install+setup/install/probenic.sh

index fb428cc49a335b3664965638d7396dc4c2a22eb7..6c01cbb45ba7daa20ad4792aa505575709dcfa02 100644 (file)
@@ -65,6 +65,12 @@ for card in `ls /sys/class/net`; do
                                                let bus=`echo 1$bus`-1000
                                                let dev=`echo 1$dev`-1000
                                                name=`lsusb -s $bus:$dev | cut -d':' -f3 | cut -c 6-`
+                                               #kernel higher 3.2 changes
+                                               if [ "$name" == "" ]; then
+                                                       vid=`grep PRODUCT= /sys/class/net/$card/device/uevent | cut -d"=" -f2 | cut -d"/" -f1`
+                                                       pid=`grep PRODUCT= /sys/class/net/$card/device/uevent | cut -d"=" -f2 | cut -d"/" -f2`
+                                                       name=`lsusb -d $vid:$pid | cut -d':' -f3 | cut -c 6-`
+                                               fi
                                                description=`echo $type: $name`
                                        fi