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