Package: cpufrequtils
Version: 002-7
Followup-For: Bug #461470

Hi!

I update the patch to only choose one of the new config options if both
of them are set.
This should make the new version of the init script compatible to older
version if the user does not (want to) change the config.

There is an update for the default file attached, too.

Ciao
Max

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23.12
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cpufrequtils depends on:
ii  debconf [debconf-2.0]         1.5.18     Debian configuration management sy
ii  libc6                         2.7-6      GNU C Library: Shared libraries
ii  libcpufreq0                   002-7      shared library to deal with the cp
ii  lsb-base                      3.1-24     Linux Standard Base 3.1 init scrip

cpufrequtils recommends no packages.

-- debconf information excluded
--- /etc/init.d/cpufrequtils    2008-01-18 22:11:46.000000000 +0100
+++ /etc/init.d/cpufrequtils    2008-01-18 22:12:16.000000000 +0100
@@ -61,6 +61,17 @@
 # if not enabled then exit gracefully
 [ "$ENABLE" = "true" ] || exit 0
 
+# Check if we're running on AC/battery power.
+if [ "${GOVERNOR_ON_AC}" -a "${GOVERNOR_ON_BAT}" ]; then
+       if command -v on_ac_power >/dev/null; then
+               if on_ac_power; then
+                       GOVERNOR="${GOVERNOR_ON_AC}"
+               else
+                       GOVERNOR="${GOVERNOR_ON_BAT}"
+               fi
+       fi
+fi
+
 if [ -n "$MAX_SPEED" ] && [ $MAX_SPEED != "0" ] ; then
        CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --max $MAX_SPEED"
 fi

Reply via email to