[go: up one dir, main page]

File: athcool.init

package info (click to toggle)
athcool 0.3.12-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 144 kB
  • ctags: 93
  • sloc: ansic: 571; sh: 100; makefile: 81
file content (46 lines) | stat: -rwxr-xr-x 847 bytes parent folder | download | duplicates (3)
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
#!/bin/bash
#
# athcool	This scripts runs athcool, enabling/disabling
#		powersaving mode for Athlon/Duron processors.
#
# chkconfig: 2345 10 90
# description: 	This scripts runs athcool, enabling/disabling \
#		powersaving mode for Athlon/Duron processors.

PROG=/usr/sbin/athcool
RETVAL=$?

test -x $PROG || exit 0

case "$1" in
    start)
	echo -n "Enabling Athlon powersaving mode..."
	if $PROG on > /dev/null; then
	    echo "done."
	else
	    echo "failed."
	fi
	;;
    stop)
	echo -n "Disabling Athlon powersaving mode..."
	if $PROG off > /dev/null; then
	    echo "done."
	else
	    echo "failed."
	fi
	;;
    status)
	echo -n "Query Athlon powersaving mode..."
	$PROG stat
	;;
    restart|force-reload)
	$0 stop
	$0 start
	;;
    *)
	echo "Usage: /etc/init.d/athcool {start|stop|status|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0