Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 119503 Details for
Bug 152810
sys-power/cpufreqd: load/unload necessary modules
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
cpufreqd-init.d.patch
cpufreqd-init.d.patch (text/plain), 1.75 KB, created by
Christian Heim (RETIRED)
on 2007-05-17 08:41:29 UTC
(
hide
)
Description:
cpufreqd-init.d.patch
Filename:
MIME Type:
Creator:
Christian Heim (RETIRED)
Created:
2007-05-17 08:41:29 UTC
Size:
1.75 KB
patch
obsolete
>--- cpufreqd-2.1.1-init.d 2006-07-04 18:34:49.000000000 +0200 >+++ cpufreqd-init.d 2007-05-17 10:31:04.000000000 +0200 >@@ -1,7 +1,7 @@ > #!/sbin/runscript >-# Copyright 1999-2006 Gentoo Foundation >+# Copyright 1999-2007 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/files/cpufreqd-2.1.1-init.d,v 1.1 2006/07/04 16:34:49 brix Exp $ >+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/files/cpufreqd-2.2.1-init.d,v 1.1 2006/11/30 16:42:10 peper Exp $ > > CONFIGFILE=/etc/cpufreqd.conf > >@@ -16,13 +16,29 @@ checkconfig() { > return 1 > fi > >- if [[ ! -e /proc/cpufreq ]] && [[ ! -e /sys/devices/system/cpu/cpu0/cpufreq ]]; then >+ if [[ ! -e /proc/cpufreq ]] ; then >+ for cpu in /sys/devices/system/cpu/cpu[0-9]* ; do >+ # 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 > } > > start() { >+ local module="" >+ >+ if [ -f /proc/modules ] ; then >+ einfo "Loading CPU Frequency scaling modules" >+ for module in ${MODULES} ; do >+ ebegin " Loading ${module}" >+ modprobe ${module} 2> /dev/null >+ eend $? >+ done >+ fi >+ > checkconfig || return 1 > > ebegin "Starting CPU Frequency Daemon" >@@ -32,7 +48,18 @@ start() { > } > > stop() { >+ local module="" > ebegin "Stopping CPU Frequency Daemon" > start-stop-daemon --stop --exec /usr/sbin/cpufreqd > eend ${?} >+ >+ if [ -f /proc/modules ] ; then >+ einfo "Unloading CPU Frequency scaling modules" >+ >+ for module in ${MODULES} ; do >+ ebegin " Unloading ${module}" >+ modprobe -r ${module} 2> /dev/null >+ eend $? >+ done >+ fi > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 152810
:
119502
| 119503