Subversion Repositories public

Rev

Rev 209 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
207 andreas 1
#!/bin/sh
2
 
3
# To be able to access the USB device as a normal user, we've to set some
4
# lines to the UDEV config file.
5
CFILE=ls /etc/udev/rules.d/??-permissions.rules
6
 
7
if [ ! -f "$CFILE" ]; then
8
   exit 0
9
fi
10
 
11
grep '{idVendor}=="091e"' $CFILE > /dev/null 2>&1
12
 
13
if [ $? = 1 ]; then
14
   echo '# Automaticaly inserted by SportWatcher at '`date` >> $CFILE
15
   echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="091e", ATTRS{idProduct}=="0003", GROUP="users"' >> $CFILE
16
   echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="091e", ATTRS{idProduct}=="0003", MODE="0666"' >> $CFILE
17
fi
18
 
19
lsmod | grep garmin_gps > /dev/null 2>&1
20
 
21
if [ $? = 0 ]; then
22
   rmmod garmin_gps
23
fi
24
 
25
CFILE=/etc/modprobe.d/blacklist
26
 
27
grep 'garmin_gps' $CFILE > /dev/null 2>&1
28
 
29
if [ $? = 1 ]; then
30
   echo "# Added by SportWatcher at "`date` >> $CFILE
31
   echo "blacklist garmin_gps" >> $CFILE
32
fi
33
 
34
# Automatically added by dh_installmenu
35
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
36
	update-menus
37
fi
38
# End automatically added section
39
 
40
exit 0
41