summaryrefslogtreecommitdiff
path: root/scripts/bcm5974-post-install
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2008-10-08 23:16:47 +0200
committerHenrik Rydberg <rydberg@euromail.se>2008-10-08 23:16:47 +0200
commite018e95b0785ba2ee0e219cd0b59ca58eeeeb9f3 (patch)
treec8f67744751f58f465ee54d8cfdc0ab9122ebc7e /scripts/bcm5974-post-install
parent563dae29cd97e8ab1428a4827bdef557ee6fd235 (diff)
bcm5974 (0.5) unstable; urgency=low
* Working palm detection * Changes for kernel.org * DKMS introduced. -- Henrik Rydberg <rydberg@euromail.se> Sun, 06 Jul 2008 20:59:39 +0200
Diffstat (limited to 'scripts/bcm5974-post-install')
-rwxr-xr-xscripts/bcm5974-post-install50
1 files changed, 50 insertions, 0 deletions
diff --git a/scripts/bcm5974-post-install b/scripts/bcm5974-post-install
new file mode 100755
index 0000000..21e989e
--- /dev/null
+++ b/scripts/bcm5974-post-install
@@ -0,0 +1,50 @@
1#!/bin/bash
2#
3# bcm5943-post-install - post-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
23ETCPATH=/etc/modprobe.d/$DRIVER
24
25echo -----------------------------------------------------------------------
26
27DIR=`dirname $0`
28PAT_HEAD="options usbhid quirks="
29PAT_MBA="0x05ac:0x022"
30PAT_MBP="0x05ac:0x023"
31MATCH_MBA=$PAT_HEAD$PAT_MBA
32MATCH_MBB=$PAT_HEAD$PAT_MBB
33
34if [ -x /usr/sbin/lsusb ]; then
35 if [ "lsusb|grep $PAT_MBA" != "" ]; then
36 SED="s/#$MATCH_MBA/$MATCH_MBA/"
37 elif [ $has_mbb -gt 0 ]; then
38 SED="s/#$MATCH_MBP/$MATCH_MBP/"
39 else
40 echo No suitable device found
41 exit 1
42 fi
43else
44 echo \* USB device: UNKNOWN - lsusb not found
45 exit 1
46fi
47
48cat $DIR/..$ETCPATH | sed "$SED" > $ETCPATH
49
50exit 0