From 193b0aa7eacffd3fd3e9819d67d4a1ac9078849e Mon Sep 17 00:00:00 2001 From: Piotr Jaroszyński Date: Tue, 24 Oct 2006 12:39:53 +0000 Subject: Fixed the init script to start if at least one cpu supports freq scaling. (Portage version: 2.1.2_pre3-r7) --- sys-power/cpufreqd/ChangeLog | 6 +++++- sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d | 17 +++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'sys-power') 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 + 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 } -- cgit v1.2.3-65-gdbad