From f9a35c63d6114a9c922bf3b84233e74b61f99f10 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Wed, 8 Oct 2008 23:21:44 +0200 Subject: bcm5974 (0.54) unstable; urgency=low * And another one... finally got the bright idea to test it by emulating the different product ids. -- Henrik Rydberg Tue, 08 Jul 2008 20:59:39 +0200 --- scripts/bcm5974-post-install | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/bcm5974-post-install b/scripts/bcm5974-post-install index 8c71be0..5674d40 100755 --- a/scripts/bcm5974-post-install +++ b/scripts/bcm5974-post-install @@ -25,17 +25,19 @@ ETCPATH=/etc/modprobe.d/$DRIVER echo ----------------------------------------------------------------------- DIR=`dirname $0` +LSUSB=/usr/sbin/lsusb + PAT_HEAD="options usbhid quirks=" -PAT_MBA="0x05ac:0x022" -PAT_MBP="0x05ac:0x023" -MATCH_MBA=$PAT_HEAD$PAT_MBA -MATCH_MBP=$PAT_HEAD$PAT_MBP +PAT[0]="05ac:022" +PAT[1]="05ac:023" +MATCH[0]=${PAT_HEAD}0x05ac:0x022 +MATCH[1]=${PAT_HEAD}0x05ac:0x023 -if [ -x /usr/sbin/lsusb ]; then - if [ "lsusb|grep $PAT_MBA" != "" ]; then - SED="s/#$MATCH_MBA/$MATCH_MBA/" - elif [ "lsusb|grep $PAT_MBP" != "" ]; then - SED="s/#$MATCH_MBP/$MATCH_MBP/" +if [ -x $LSUSB ]; then + if [ "`$LSUSB|grep ${PAT[0]}`" != "" ]; then + SED="s/#${MATCH[0]}/${MATCH[0]}/" + elif [ "`$LSUSB|grep ${PAT[1]}`" != "" ]; then + SED="s/#${MATCH[1]}/${MATCH[1]}/" else echo No suitable device found exit 1 -- cgit v1.2.3