updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / cpupower / rc
blob812637b619d0ff4484a439617a98759e5b6984d6
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 [[ -f /etc/conf.d/cpupower ]] && . /etc/conf.d/cpupower
8 case "$1" in
9 start|restart)
10 stat_busy "Setting cpupower rules"
12 declare params=''
13 if [[ "$governor" ]]; then
14 params="-g $governor "
15 params+="${min_freq:+-d $min_freq} "
16 params+="${max_freq:+-u $max_freq} "
17 params+="${freq:+-f $freq} "
18 cpupower frequency-set $params >/dev/null || { stat_fail; exit 1; }
19 stat_done
20 else
21 stat_append ': Invalid configuration'
22 stat_fail
26 echo "usage: $0 {start|restart}"
27 esac
29 true
31 # vim:set ts=2 sw=2 ft=sh et: