summaryrefslogtreecommitdiffstats
path: root/cpufreq.init
blob: 7936dc78c0a2e7f17fcce77f0ef393c37c53288d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: cpufreq
# Default-Start: 2 3 4 5
# Short-Description: Set CPU frequency settings
# Description: Set CPU frequency settings
### END INIT INFO

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

RETVAL=0

start() {
	gprintf "Setting CPU frequency settings: "
	touch /var/lock/subsys/cpufreq
	/usr/bin/cpufreq
	success
	echo
}

case "$1" in
	start)
		start
		;;
	stop)
		;;
	restart|reload)
		start
		;;
	condrestart)
		if [ -f /var/lock/subsys/cpufreq ]; then
			start
		fi
		;;
	status)
		[ -f /var/lock/subsys/cpufreq ]
		RETVAL=$?
		;;
	*)
		gprintf "Usage: %s {start|stop|restart|condrestart|status}\n" `basename $0`
		RETVAL=1
		;;
esac

exit $RETVAL