#!/bin/sh
# keytouch - a program to configure the extra function keys of the keyboard
### BEGIN INIT INFO
# Provides:          keytouch
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Should-Start:      
# Should-Stop:       
# Default-Start:     2
# Default-Stop:      0 6
# Short-Description: Initialize extra function keys in multimedia keyboards
# Description:       Initializes kernel keymappings for multimedia keyboard's
#                    extra function keys. This mappings are used by the keytouch
#                    daemon inside an X session to assign actions to those keys.
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/keytouch-init
KEYBOARD_FILE=/etc/keytouch/current_keyboard.xml
NAME=keytouch-init
DESC=keytouch

set -e

test -x $DAEMON || exit 0
test -f $KEYBOARD_FILE || exit 0

case "$1" in
  start|restart|force-reload)
	echo -n "Initializing $DESC: "
	$DAEMON
	echo "done."
	;;
  stop|status)
        echo "Nothing to do."
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0
