summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bcm5974-diagnostics11
-rwxr-xr-xscripts/bcm5974-post-install20
-rwxr-xr-xscripts/bcm5974-pre-install42
3 files changed, 54 insertions, 19 deletions
diff --git a/scripts/bcm5974-diagnostics b/scripts/bcm5974-diagnostics
index 0322158..acd0bf4 100755
--- a/scripts/bcm5974-diagnostics
+++ b/scripts/bcm5974-diagnostics
@@ -131,22 +131,13 @@ if [ -f $DEVPATH ]; then
131 echo \* $DEVPATH: module is registered 131 echo \* $DEVPATH: module is registered
132 else 132 else
133 echo \* $DEVPATH: module is NOT registered 133 echo \* $DEVPATH: module is NOT registered
134 echo No help on this one... 134 echo "Please double-check the quirks settings in $DRIVMOD"
135 exit 1 135 exit 1
136 fi 136 fi
137else 137else
138 echo \* $DEVPATH: does not exist, ignore 138 echo \* $DEVPATH: does not exist, ignore
139fi 139fi
140 140
141# Was the $DRIVER properly initialized?
142WELLSPRING=`dmesg|grep $DRIVER|grep Wellspring`
143if [ "$WELLSPRING" != "" ]; then
144 echo \* $DRIVER: Wellspring was initialized
145else
146 echo \* $DRIVER: Wellspring was NOT initialized
147 exit 1
148fi
149
150# Do we have synaptics working properly? 141# Do we have synaptics working properly?
151typeset -i SYNLINES=`synclient -l|wc -l` 142typeset -i SYNLINES=`synclient -l|wc -l`
152if [ $SYNLINES -gt 10 ]; then 143if [ $SYNLINES -gt 10 ]; then
diff --git a/scripts/bcm5974-post-install b/scripts/bcm5974-post-install
index 21e989e..5674d40 100755
--- a/scripts/bcm5974-post-install
+++ b/scripts/bcm5974-post-install
@@ -25,17 +25,19 @@ ETCPATH=/etc/modprobe.d/$DRIVER
25echo ----------------------------------------------------------------------- 25echo -----------------------------------------------------------------------
26 26
27DIR=`dirname $0` 27DIR=`dirname $0`
28LSUSB=/usr/sbin/lsusb
29
28PAT_HEAD="options usbhid quirks=" 30PAT_HEAD="options usbhid quirks="
29PAT_MBA="0x05ac:0x022" 31PAT[0]="05ac:022"
30PAT_MBP="0x05ac:0x023" 32PAT[1]="05ac:023"
31MATCH_MBA=$PAT_HEAD$PAT_MBA 33MATCH[0]=${PAT_HEAD}0x05ac:0x022
32MATCH_MBB=$PAT_HEAD$PAT_MBB 34MATCH[1]=${PAT_HEAD}0x05ac:0x023
33 35
34if [ -x /usr/sbin/lsusb ]; then 36if [ -x $LSUSB ]; then
35 if [ "lsusb|grep $PAT_MBA" != "" ]; then 37 if [ "`$LSUSB|grep ${PAT[0]}`" != "" ]; then
36 SED="s/#$MATCH_MBA/$MATCH_MBA/" 38 SED="s/#${MATCH[0]}/${MATCH[0]}/"
37 elif [ $has_mbb -gt 0 ]; then 39 elif [ "`$LSUSB|grep ${PAT[1]}`" != "" ]; then
38 SED="s/#$MATCH_MBP/$MATCH_MBP/" 40 SED="s/#${MATCH[1]}/${MATCH[1]}/"
39 else 41 else
40 echo No suitable device found 42 echo No suitable device found
41 exit 1 43 exit 1
diff --git a/scripts/bcm5974-pre-install b/scripts/bcm5974-pre-install
new file mode 100755
index 0000000..1e2b864
--- /dev/null
+++ b/scripts/bcm5974-pre-install
@@ -0,0 +1,42 @@
1#!/bin/bash
2#
3# bcm5943-pre-install - check system before installing the bcm5974
4#
5# Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se)
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20#
21
22DRIVER=bcm5974
23LSUSB=/usr/sbin/lsusb
24
25PAT[0]="05ac:022"
26PAT[1]="05ac:023"
27
28if [ -x $LSUSB ]; then
29 if [ "`$LSUSB|grep ${PAT[0]}`" != "" ]; then
30 exit 0
31 elif [ "`$LSUSB|grep ${PAT[1]}`" != "" ]; then
32 exit 0
33 else
34 echo bcm5974: no suitable device found
35 exit -1
36 fi
37else
38 echo bcm5974: cannot determine device type
39 exit -1
40fi
41
42exit 0