diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/bcm5974-pre-install | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/bcm5974-pre-install b/scripts/bcm5974-pre-install new file mode 100755 index 0000000..3c4556e --- /dev/null +++ b/scripts/bcm5974-pre-install | |||
| @@ -0,0 +1,43 @@ | |||
| 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 true; then | ||
| 30 | if [ "`$LSUSB|grep ${PAT[0]}`" != "" ]; then | ||
| 31 | exit 0 | ||
| 32 | elif [ "`$LSUSB|grep ${PAT[1]}`" != "" ]; then | ||
| 33 | exit 0 | ||
| 34 | else | ||
| 35 | echo bcm5974: no suitable device found | ||
| 36 | exit 1 | ||
| 37 | fi | ||
| 38 | else | ||
| 39 | echo bcm5974: cannot determine device type | ||
| 40 | exit 1 | ||
| 41 | fi | ||
| 42 | |||
| 43 | exit 0 | ||
