#!/bin/sh

### BEGIN INIT INFO
# Provides:          fvcool
# Required-Start: $remote_fs
# Should-Start:
# Required-Stop: $remote_fs
# Should-Stop:
# Default-Start:     1 2 3 5
# Default-Stop:      0 6
# Short-Description: CPU cooling software for AMD's Athlon/Duron
# Description:       This is a VCool for FreeBSD,
#	NetBSD/OpenBSD, Linux, and Solaris on x86
### END INIT INFO

fvcool_BIN=/usr/sbin/fvcool
test -x $fvcool_BIN || { echo "$fvcool_BIN not installed"; 
	if [ "$1" = "stop" ]; then exit 0;
	else exit 5; fi; }

. /etc/rc.status
rc_reset

case "$1" in
    start)
	echo "Starting fvcool "
	$fvcool_BIN -e
	;;

    stop)
	echo "Shutting down fvcool "
	$fvcool_BIN -d
	;;

    restart)
	echo "Shutting down fvcool "
	$fvcool_BIN -d
	echo "Starting fvcool "
	$fvcool_BIN -e
	;;

    *)
	echo "Usage: $0 {start|stop|restart}"
	exit 1
	;;
esac
rc_exit


