updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / k10ctl / k10ctl.rc
bloba6e27bcc185d3eb88b4c7abfc9b9326d8266bd64
1 #!/bin/bash
3 daemon_name=k10ctl
4 . /etc/rc.conf
5 . /etc/rc.d/functions
6 . /etc/conf.d/$daemon_name
8 let CORES=CORES-1
10 case "$1" in
11 start)
12 stat_busy "Setting CPU Voltages"
14 if ${CONFIGURATED}; then
15 # RUN
16 for i in ${PSTATES[@]}; do
17 $daemon_name 0-${CORES} $i -nv ${NBVID[$i]} -cv ${CPUVID[$i]} -cd ${DID[$i]} -cf ${FID[$i]}
18 done
20 if [ $? -gt 0 ]; then
21 stat_fail
22 exit 1
23 else
24 stat_done
26 else
27 stat_fail
28 exit 1
33 echo "usage: $0 {start}"
34 esac
36 exit 0