#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

depend() {
	need localmount
	use logger
}

checkconfig() {
	if [ ! -e /proc/acpi/sony/fnkey ] ; then
		eerror "Sony acpi key handler not found"
		return 1
	fi
}

start() {
	ebegin "Starting fsfn key handler"
	start-stop-daemon --start \
		--nicelevel 10 \
		--pidfile /var/run/fsfn.pid \
		-x "/usr/local/bin/fsfn"
	eend $?
}

stop() {
	ebegin "Stopping fsfn key handler"
	start-stop-daemon --stop --pidfile /var/run/fsfn.pid
	eend $?
}

