summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Jaroszyński <peper@gentoo.org>2006-10-24 12:39:53 +0000
committerPiotr Jaroszyński <peper@gentoo.org>2006-10-24 12:39:53 +0000
commit193b0aa7eacffd3fd3e9819d67d4a1ac9078849e (patch)
tree7f2dba1a085878b22ce0ff6130db64199de68d3e /sys-power
parentdon't hard-enable 3dnow(ext) on amd64 as EM64T doesn't have it (diff)
downloadgentoo-2-193b0aa7eacffd3fd3e9819d67d4a1ac9078849e.tar.gz
gentoo-2-193b0aa7eacffd3fd3e9819d67d4a1ac9078849e.tar.bz2
gentoo-2-193b0aa7eacffd3fd3e9819d67d4a1ac9078849e.zip
Fixed the init script to start if at least one cpu supports freq scaling.
(Portage version: 2.1.2_pre3-r7)
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/cpufreqd/ChangeLog6
-rw-r--r--sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d17
2 files changed, 12 insertions, 11 deletions
diff --git a/sys-power/cpufreqd/ChangeLog b/sys-power/cpufreqd/ChangeLog
index 8aa71c217d6a..8fb93a976832 100644
--- a/sys-power/cpufreqd/ChangeLog
+++ b/sys-power/cpufreqd/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-power/cpufreqd
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/ChangeLog,v 1.40 2006/10/22 08:24:58 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/ChangeLog,v 1.41 2006/10/24 12:39:53 peper Exp $
+
+ 24 Oct 2006; Piotr Jaroszyński <peper@gentoo.org>
+ files/cpufreqd-2.2.0-init.d:
+ Fixed the init script to start if at least one cpu supports freq scaling.
*cpufreqd-2.2.0-r2 (22 Oct 2006)
diff --git a/sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d b/sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d
index 54d5943bb1a3..69ff24f9f288 100644
--- a/sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d
+++ b/sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d,v 1.4 2006/10/22 23:14:03 peper Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d,v 1.5 2006/10/24 12:39:53 peper Exp $
CONFIGFILE=/etc/cpufreqd.conf
@@ -16,17 +16,14 @@ checkconfig() {
return 1
fi
- if [ ! -e /proc/cpufreq ] ; then
+ if [[ ! -e /proc/cpufreq ]] ; then
for cpu in /sys/devices/system/cpu/cpu[0-9]* ; do
- n=${cpu##*/}
- n=${n/cpu/}
-
- if [ ! -e /sys/devices/system/cpu/cpu${n}/cpufreq ] ; then
- eerror "cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ"
- eerror "Make sure that the appropiate drivers for your CPU are available."
- return 1
- fi
+ # We need just one cpu supporting freq scaling.
+ [[ -e ${cpu}/cpufreq ]] && return 0
done
+ eerror "cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ"
+ eerror "Make sure that the appropiate drivers for your CPU are available."
+ return 1
fi
}