X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=de8341d772f583c51b7c6e35cd023cee1e063c80;hp=47fcc119fe9ba3cd258ea30856ffb6b89c1e7f3c;hb=cd25e7864a1a21783dce42ab226b643cb2395a86;hpb=28c2a31c8e74fdecbacfec3934ef7c4f3e584d67 diff --git a/autoconfig.functions b/autoconfig.functions index 47fcc11..de8341d 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -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 @@ -1151,6 +1155,7 @@ config_mixer () { for CONTROL in Master PCM ; do if amixer -q | grep -q "Simple mixer control '$CONTROL'" ; then + amixer -q set "${CONTROL}" unmute 1>/dev/null 2>&1 amixer -q set "${CONTROL}" "${VOL}"% eend $? fi @@ -1347,16 +1352,16 @@ 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="" ( [ -n "$COLUMNS" ] && [ -n "$LINES" ] ) && \ ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS&res=$((COLUMNS * 8))x$((LINES * 16))" - URI='$BASE_URL?action=${ACTION_NAME}\&$DATE_STRING\&unique_id=${HOST_ID}\&support_64bit=$HAS_64BIT\&version=$version\&bootup=$BOOT\¶ms=$PARAMS$ADDITIONAL_PARAMS' + URI='$BASE_URL?action=${ACTION_NAME}\&$DATE_STRING\&unique_id=${HOST_ID}\&support_64bit=$HAS_64BIT\&version=$VERSION\&bootup=$BOOT\¶ms=$PARAMS$ADDITIONAL_PARAMS' get_remote_file "$URI" "/dev/null" >/dev/null 2>&1 &! fi