Lines 3-8
Link Here
|
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
# $Header: /var/cvsroot/gentoo-x86/sys-power/cpupower/files/init.d-r2,v 1.1 2013/09/27 11:31:48 ssuominen Exp $ |
4 |
# $Header: /var/cvsroot/gentoo-x86/sys-power/cpupower/files/init.d-r2,v 1.1 2013/09/27 11:31:48 ssuominen Exp $ |
5 |
|
5 |
|
|
|
6 |
CPUFREQ_SYSFS=/sys/devices/system/cpu/cpufreq |
7 |
|
6 |
change() { |
8 |
change() { |
7 |
local c ret=0 opts="$1" |
9 |
local c ret=0 opts="$1" |
8 |
shift |
10 |
shift |
Lines 12-21
Link Here
|
12 |
: $(( ret += $? )) |
14 |
: $(( ret += $? )) |
13 |
eend ${ret} |
15 |
eend ${ret} |
14 |
|
16 |
|
15 |
if [ $# -gt 0 ] ; then |
17 |
if [ -d ${CPUFREQ_SYSFS} ] && [ $# -gt 0 ] ; then |
16 |
c=1 |
18 |
c=1 |
17 |
einfo "Setting extra options: $*" |
19 |
einfo "Setting extra options: $*" |
18 |
if cd /sys/devices/system/cpu/cpufreq ; then |
20 |
if cd ${CPUFREQ_SYSFS} ; then |
19 |
local o v |
21 |
local o v |
20 |
for o in "$@" ; do |
22 |
for o in "$@" ; do |
21 |
v=${o#*=} |
23 |
v=${o#*=} |