#!/bin/sh
#
# Load kernel modules needed to enable cpufreq scaling
#
# chkconfig: 345 12 90
# description: Save power when idling

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

LOCKFILE=/var/lock/subsys/cpufreq-simple
RETVAL=0

SourceIfNotEmpty /etc/sysconfig/cpufreq-simple

start()
{
	action "Tune up cpufreq: " cpufreq-simple
	RETVAL="$?"
	return $RETVAL
}

# See how we were called.
case "$1" in
	start)
		start
		;;
	stop)
		# Nothing to do
		;;
	reload)
		start
		;;
	restart)
		start
		;;
	condstop)
		# Nothing to do
		;;
	condrestart)
		# Nothing to do
		;;
	condreload)
		# Nothing to do
		;;
	status)
		cpufreq-simple status
		;;
	*)
		msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
		RETVAL=1
esac

exit $RETVAL
