]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | # | |
3 | # athcool This shell script takes care of starting athcool | |
4 | # | |
5 | # chkconfig: 2345 69 31 | |
6 | # description: set/unset power saving bit on Athlons(TM) with athcool | |
7 | # processname: athcool | |
8 | ||
9 | # Source function library. | |
10 | . /etc/rc.d/init.d/functions | |
11 | ||
12 | ATHCOOL_RUN=no | |
13 | ATHCOOL_ACTION="on fixup" | |
14 | ||
15 | # Get service config | |
16 | [ -f /etc/sysconfig/athcool ] && . /etc/sysconfig/athcool | |
17 | ||
18 | # See how we were called. | |
19 | case "$1" in | |
20 | start|restart|force-reload) | |
21 | if [ "$ATHCOOL_RUN" = "yes" ]; then | |
22 | run_cmd "Starting Athlon Cooling" athcool $ATHCOOL_ACTION | |
23 | fi | |
24 | ;; | |
25 | stop) | |
26 | if [ "$ATHCOOL_RUN" = "yes" ]; then | |
27 | run_cmd "Stoping Athlon Cooling" athcool off | |
28 | fi | |
29 | ;; | |
30 | status) | |
31 | athcool stat | |
32 | ;; | |
33 | *) | |
34 | msg_usage "$0 {start|stop|restart|force-reload|status}" | |
35 | exit 3 | |
36 | esac |