#!/bin/sh

# set -e

# set the bt input profile ON

/sbin/set-bt-input on

# set up the arrow cursor

if  [ ! -e "/usr/share/icons/default/cursors/trans.orig" ] ; then 
  cp /usr/share/icons/default/cursors/transp /usr/share/icons/default/cursors/transp.orig
fi

cp /usr/share/icons/default/cursors/arrow.azerty1 /usr/share/icons/default/cursors/transp

# make the list of bt hid devices for the daemon

/usr/bin/make-bt-hid-list

# make the BT watch daemon start automatically

update-rc.d bt-hid-daemon start 99 1 2 3 4 5 . stop 99 0 6

# put in the new mouse driver

if  [ ! -e "/usr/lib/xorg/modules/input/evdev_drv.so.orig" ] ; then 
   cp /usr/lib/xorg/modules/input/evdev_drv.so /usr/lib/xorg/modules/input/evdev_drv.so.orig
fi

# This line reboots my device! That's why I'm putting it last.

cp /usr/lib/xorg/modules/input/evdev_drv.so.azerty1 /usr/lib/xorg/modules/input/evdev_drv.so

exit 0