Package: cpufrequtils
Version: 007-1
Severity: wishlist

It would be appreciated if cpufrequtils would let you specify governors and
speed limitations in /etc/default/cpufrequtils, rather than the init.d script
itself.  This would ease upgrades somewhat.

-- System Information:
Debian Release: 6.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cpufrequtils depends on:
ii  debconf [debconf-2.0]         1.5.37     Debian configuration management sy
ii  libc6                         2.11.2-7   Embedded GNU C Library: Shared lib
ii  libcpufreq0                   007-1      shared library to deal with the cp
ii  lsb-base                      3.2-26     Linux Standard Base 3.2 init scrip

cpufrequtils recommends no packages.

cpufrequtils suggests no packages.

-- Configuration Files:
/etc/init.d/cpufrequtils changed:
DESC="CPUFreq Utilities"
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
CPUFREQ_SET=/usr/bin/cpufreq-set
CPUFREQ_INFO=/usr/bin/cpufreq-info
CPUFREQ_OPTIONS=""
.. /lib/lsb/init-functions
ENABLE="true"
GOVERNOR="conservative"
MAX_SPEED="0"
MIN_SPEED="0"
check_governor_avail() {
        info="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
        if [ -f $info ] && grep -q "\<$GOVERNOR\>" $info ; then
                return 0;
        fi
        return 1;
}
[ -x $CPUFREQ_SET ] || exit 0
if [ -f /etc/default/cpufrequtils ] ; then
        . /etc/default/cpufrequtils
fi
[ "$ENABLE" = "true" ] || exit 0
if [ -n "$MAX_SPEED" ] && [ $MAX_SPEED != "0" ] ; then
        CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --max $MAX_SPEED"
fi
if [ -n "$MIN_SPEED" ] && [ $MIN_SPEED != "0" ] ; then
        CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --min $MIN_SPEED"
fi
if [ -n "$GOVERNOR" ] ; then
        CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --governor $GOVERNOR"
fi
CPUS=$(cat /proc/stat|sed -ne 's/^cpu\([[:digit:]]\+\).*/\1/p')
RETVAL=0
case "$1" in
        start|force-reload|restart|reload)
                log_action_begin_msg "$DESC: Setting $GOVERNOR CPUFreq governor"
                if check_governor_avail ; then
                        for cpu in $CPUS ; do
                                log_action_cont_msg "CPU${cpu}"
                                $CPUFREQ_SET --cpu $cpu $CPUFREQ_OPTIONS 2>&1 > 
/dev/null || \
                                        RETVAL=$?
                        done
                        log_action_end_msg $RETVAL ""
                else
                        log_action_cont_msg "disabled, governor not available"
                        log_action_end_msg $RETVAL
                fi
                ;;
        stop)
                ;;
        *)
                echo "Usage: $0 {start|stop|restart|reload|force-reload}"
                exit 1
esac
exit 0


-- debconf information:
  cpufrequtils/enable: true



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to