diff options
author | 2006-10-16 18:12:29 +0000 | |
---|---|---|
committer | 2006-10-16 18:12:29 +0000 | |
commit | a69fbdfb0233bcea8b5db93f0914121d16453cd2 (patch) | |
tree | 05eb06b8674f8df8c7e0fe14820daa282ae20f44 /sys-power | |
parent | Handle no kernel sources with eerror instead of die, thanks to Chris Gianello... (diff) | |
download | gentoo-2-a69fbdfb0233bcea8b5db93f0914121d16453cd2.tar.gz gentoo-2-a69fbdfb0233bcea8b5db93f0914121d16453cd2.tar.bz2 gentoo-2-a69fbdfb0233bcea8b5db93f0914121d16453cd2.zip |
Adding the init-script for 2.2.0, thanks to Calchan for reporting it.
(Portage version: 2.1.2_pre3-r2)
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/cpufreqd/ChangeLog | 6 | ||||
-rw-r--r-- | sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d | 38 |
2 files changed, 43 insertions, 1 deletions
diff --git a/sys-power/cpufreqd/ChangeLog b/sys-power/cpufreqd/ChangeLog index 0258183957eb..54a349051a75 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.37 2006/10/14 15:02:35 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/ChangeLog,v 1.38 2006/10/16 18:12:29 phreak Exp $ + + 16 Oct 2006; Christian Heim <phreak@gentoo.org> + +files/cpufreqd-2.2.0-init.d: + Adding the init-script for 2.2.0, thanks to Calchan for reporting it. 14 Oct 2006; Christian Heim <phreak@gentoo.org> cpufreqd-2.2.0.ebuild: Dropping from nvclock-0.8b2 to 0.8b (thanks to Marijn Schouten and Bernard diff --git a/sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d b/sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d new file mode 100644 index 000000000000..21fa262761eb --- /dev/null +++ b/sys-power/cpufreqd/files/cpufreqd-2.2.0-init.d @@ -0,0 +1,38 @@ +#!/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.1 2006/10/16 18:12:29 phreak Exp $ + +CONFIGFILE=/etc/cpufreqd.conf + +depend() { + need localmount + use logger lm_sensors +} + +checkconfig() { + if [[ ! -f ${CONFIGFILE} ]]; then + eerror "Configuration file ${CONFIGFILE} not found" + return 1 + fi + + if [[ ! -e /proc/cpufreq ]] && [[ ! -e /sys/devices/system/cpu/cpu0/cpufreq ]]; then + eerror "cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting CPU Frequency Daemon" + start-stop-daemon --start --exec /usr/sbin/cpufreqd -- \ + -f ${CONFIGFILE} + eend ${?} +} + +stop() { + ebegin "Stopping CPU Frequency Daemon" + start-stop-daemon --stop --exec /usr/sbin/cpufreqd + eend ${?} +} |