diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/bcm5974-diagnostics | 11 | ||||
| -rwxr-xr-x | scripts/bcm5974-post-install | 20 | ||||
| -rwxr-xr-x | scripts/bcm5974-pre-install | 42 |
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 |
| 137 | else | 137 | else |
| 138 | echo \* $DEVPATH: does not exist, ignore | 138 | echo \* $DEVPATH: does not exist, ignore |
| 139 | fi | 139 | fi |
| 140 | 140 | ||
| 141 | # Was the $DRIVER properly initialized? | ||
| 142 | WELLSPRING=`dmesg|grep $DRIVER|grep Wellspring` | ||
| 143 | if [ "$WELLSPRING" != "" ]; then | ||
| 144 | echo \* $DRIVER: Wellspring was initialized | ||
| 145 | else | ||
| 146 | echo \* $DRIVER: Wellspring was NOT initialized | ||
| 147 | exit 1 | ||
| 148 | fi | ||
| 149 | |||
| 150 | # Do we have synaptics working properly? | 141 | # Do we have synaptics working properly? |
| 151 | typeset -i SYNLINES=`synclient -l|wc -l` | 142 | typeset -i SYNLINES=`synclient -l|wc -l` |
| 152 | if [ $SYNLINES -gt 10 ]; then | 143 | if [ $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 | |||
| 25 | echo ----------------------------------------------------------------------- | 25 | echo ----------------------------------------------------------------------- |
| 26 | 26 | ||
| 27 | DIR=`dirname $0` | 27 | DIR=`dirname $0` |
| 28 | LSUSB=/usr/sbin/lsusb | ||
| 29 | |||
| 28 | PAT_HEAD="options usbhid quirks=" | 30 | PAT_HEAD="options usbhid quirks=" |
| 29 | PAT_MBA="0x05ac:0x022" | 31 | PAT[0]="05ac:022" |
| 30 | PAT_MBP="0x05ac:0x023" | 32 | PAT[1]="05ac:023" |
| 31 | MATCH_MBA=$PAT_HEAD$PAT_MBA | 33 | MATCH[0]=${PAT_HEAD}0x05ac:0x022 |
| 32 | MATCH_MBB=$PAT_HEAD$PAT_MBB | 34 | MATCH[1]=${PAT_HEAD}0x05ac:0x023 |
| 33 | 35 | ||
| 34 | if [ -x /usr/sbin/lsusb ]; then | 36 | if [ -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 | |||
| 22 | DRIVER=bcm5974 | ||
| 23 | LSUSB=/usr/sbin/lsusb | ||
| 24 | |||
| 25 | PAT[0]="05ac:022" | ||
| 26 | PAT[1]="05ac:023" | ||
| 27 | |||
| 28 | if [ -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 | ||
| 37 | else | ||
| 38 | echo bcm5974: cannot determine device type | ||
| 39 | exit -1 | ||
| 40 | fi | ||
| 41 | |||
| 42 | exit 0 | ||
