Release new version 0.9.41
[grml-autoconfig.git] / autoconfig.functions
index 43902a7..1a3488b 100755 (executable)
@@ -960,14 +960,18 @@ if [ -x /etc/init.d/loadcpufreq ] ; then
    rm -f $LOADCPUFREQ
 
    if [ -z "$SKIP_CPU_GOVERNOR" ] ; then
-      einfo "Loading cpufreq_ondemand, setting ondemand governor"
-      RC=0
-      if modprobe cpufreq_ondemand ; RC=$? ; then
-         for file in $(find /sys/devices/system/cpu/ -name scaling_governor 2>/dev/null) ; do
-            echo ondemand > $file
-         done
-      fi
-      eend $RC
+     if grep -vq ondemand /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors; then
+       einfo "Loading cpufreq_ondemand"
+       modprobe cpufreq_ondemand
+       eend $?
+     fi
+
+     einfo "Setting ondemand governor"
+     RC=0
+     for file in $(find /sys/devices/system/cpu/ -name scaling_governor 2>/dev/null) ; do
+       echo ondemand > $file || RC=1
+     done
+     eend $RC
    fi # cpu-governor
 
    eoutdent
@@ -1347,9 +1351,9 @@ config_stats() {
    [ -e /etc/grml_version ] && VERSION=$(cat /etc/grml_version) || \
      VERSION=$(lsb_release -d | awk -F: '{gsub(/^[ \t]+/, "", $2); print $2}')
 
-   PARAMS="$( echo "$CMDLINE" | sed -e 's/=[^ ]*/=VALUE/g' | tr " " "\n"|sort|tr "\n" " " )"
+   PARAMS="$( echo "$CMDLINE" | sed -e 's/=[^ ]*/=x/g' | tr " " "\n"|sort|tr "\n" " " )"
 
-   echo "$CMDLINE" | grep -q -e "fetch|nfsroot" && BOOT="remote"
+   echo "$CMDLINE" | grep -q -e "fetch" -e "nfsroot" && BOOT="remote"
    [ -z "$BOOT" ] && BOOT="local"
 
    ADDITIONAL_PARAMS=""