Rev 209 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/sh
# To be able to access the USB device as a normal user, we've to set some
# lines to the UDEV config file.
CFILE=ls /etc/udev/rules.d/??-permissions.rules
if [ ! -f "$CFILE" ]; then
exit 0
fi
grep '{idVendor}=="091e"' $CFILE > /dev/null 2>&1
if [ $? = 1 ]; then
echo '# Automaticaly inserted by SportWatcher at '`date` >> $CFILE
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="091e", ATTRS{idProduct}=="0003", GROUP="users"' >> $CFILE
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="091e", ATTRS{idProduct}=="0003", MODE="0666"' >> $CFILE
fi
lsmod | grep garmin_gps > /dev/null 2>&1
if [ $? = 0 ]; then
rmmod garmin_gps
fi
CFILE=/etc/modprobe.d/blacklist
grep 'garmin_gps' $CFILE > /dev/null 2>&1
if [ $? = 1 ]; then
echo "# Added by SportWatcher at "`date` >> $CFILE
echo "blacklist garmin_gps" >> $CFILE
fi
# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
update-menus
fi
# End automatically added section
exit 0