From: fbrehm Date: Thu, 10 May 2012 13:26:21 +0000 (+0200) Subject: committing changes in /etc after emerge run X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=212773aa1f51c1065951e6792c00afa216764863;p=config%2Fsamara%2Fetc.git committing changes in /etc after emerge run Package changes: +sys-power/cpufrequtils-008-r1 --- diff --git a/.etckeeper b/.etckeeper index d9f69ea..0ddbbd1 100755 --- a/.etckeeper +++ b/.etckeeper @@ -232,6 +232,7 @@ maybe chmod 0644 './conf.d/auditd' maybe chmod 0644 './conf.d/autofs' maybe chmod 0644 './conf.d/bootmisc' maybe chmod 0644 './conf.d/consolefont' +maybe chmod 0644 './conf.d/cpufrequtils' maybe chmod 0644 './conf.d/crypto-loop' maybe chmod 0644 './conf.d/device-mapper' maybe chmod 0644 './conf.d/dmesg' @@ -1101,6 +1102,7 @@ maybe chmod 0755 './init.d/courier-imapd' maybe chmod 0755 './init.d/courier-imapd-ssl' maybe chmod 0755 './init.d/courier-pop3d' maybe chmod 0755 './init.d/courier-pop3d-ssl' +maybe chmod 0755 './init.d/cpufrequtils' maybe chmod 0755 './init.d/crypto-loop' maybe chmod 0755 './init.d/cupsd' maybe chmod 0755 './init.d/dbus' diff --git a/conf.d/cpufrequtils b/conf.d/cpufrequtils new file mode 100644 index 0000000..8959664 --- /dev/null +++ b/conf.d/cpufrequtils @@ -0,0 +1,11 @@ +# /etc/conf.d/cpufrequtils: config file for /etc/init.d/cpufrequtils + +# Options when starting cpufreq (given to the `cpufreq-set` program) +START_OPTS="--governor ondemand" + +# Options when stopping cpufreq (given to the `cpufreq-set` program) +STOP_OPTS="--governor performance" + +# Extra settings to write to sysfs cpufreq values. +#SYSFS_EXTRA="ondemand/ignore_nice_load=1 ondemand/up_threshold=70" + diff --git a/init.d/cpufrequtils b/init.d/cpufrequtils new file mode 100755 index 0000000..adb71b0 --- /dev/null +++ b/init.d/cpufrequtils @@ -0,0 +1,41 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/files/cpufrequtils-init.d-006,v 1.2 2011/07/21 19:47:14 mattst88 Exp $ + +change() { + local c ret=0 opts="$1" + shift + ebegin "Running cpufreq-set ${opts}" + for c in $(cpufreq-info -o | awk '$1 == "CPU" { print $2 }') ; do + cpufreq-set -c ${c} ${opts} + : $(( ret += $? )) + done + eend ${ret} + + if [ $# -gt 0 ] ; then + c=1 + einfo "Setting extra options: $*" + if cd /sys/devices/system/cpu/cpufreq ; then + local o v + for o in "$@" ; do + v=${o#*=} + o=${o%%=*} + echo ${v} > ${o} || break + done + c=0 + fi + eend ${c} + : $(( ret += c )) + fi + + return ${ret} +} + +start() { + change "${START_OPTS}" ${SYSFS_EXTRA} +} + +stop() { + change "${STOP_OPTS}" +}