X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=10f05f29ed63b8442d93211717039f7695af5735;hp=07c33444152b8016d92fdafe151e6c52c807d8a1;hb=823c8bdde72f80b6a1fbfa63939633f0a36c4328;hpb=b5997c2a11f6dbf369e0e538862202992ebe88a2 diff --git a/autoconfig.functions b/autoconfig.functions index 07c3344..10f05f2 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Klaus Knopper , (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mit Jul 04 12:02:35 CEST 2007 [mika] +# Latest change: Mit Jul 11 19:34:06 CEST 2007 [mika] ################################################################################ # {{{ path, variables, signals, umask, zsh @@ -1251,7 +1251,7 @@ else # Disclaimer: sorry for the tons of if/then/else... but this makes sure we use: # * it only if we have the according kernel modules available - # * cpufreq only on laptops (check via /usr/sbin/laptop-detect) + # * cpufreq only on laptops (check via /usr/sbin/laptop-detect) and not inside Virtual Box # * current version of /etc/init.d/loadcpufreq from Debian (to stay in sync) # -> parse output of the initscript and output it according to our look'n'feel # * our own cpufreq-detect.sh if /etc/init.d/loadcpufreq isn't present @@ -1259,6 +1259,13 @@ else ewarn "Skipping cpufreq setup as module dependencies are not fulfilled." ; eend 1 else if /usr/sbin/laptop-detect 1>/dev/null 2>&1 ; then + # Virtual Box supports ACPI and laptop-detect returns with '0', so check for it: + if [ -r /proc/acpi/battery/BAT0/info ] ; then + if grep -q 'OEM info: innotek' /proc/acpi/battery/BAT0/info ; then + einfo 'Virtual Box detected, skipping cpufreq setup.' ; eend 0 + return 0 + fi + fi einfo "Detected Laptop - trying to use cpu frequency scaling:" eindent if [ -x /etc/init.d/loadcpufreq ] ; then