I'm changing it to incomplete because I want to know why only when
variable OPTIONS is equal to '-q' the use_ondemand if verified?

powernowd starts (in intrepid) if OPTIONS='' or OPTIONS='-v', but not when 
OPTIONS='-q'
I think that a better method is to do somenthing like set a new var 
PREFER_ONDEMAND_IF_SUPPORTED='true' (var name is too long, don't use it) and 
verify it.

the manpage of powernowd says:
-q     Quiet mode, only emergency output.

on init.d of intrepid:
use_ondemand() {
        if [ "$OPTIONS" != "-q" ]; then
            return 1
        fi
        status=1  # return error, if no cpu dirs are found
        for x in /sys/devices/system/cpu/cpu[0-9]*/; do
            if [ ! -d $x ] || [ ! -f $x"cpufreq/scaling_governor" ]; then
                continue
            fi
            echo -n ondemand > $x"cpufreq/scaling_governor"
            status=$?
            if [ $status != 0 ]; then
                return $status
            fi
            # The default behaviour of powernowd is to ignore nice load:
            if [ -f $x"cpufreq/ondemand/ignore_nice_load" ]; then
                echo -n 1 > $x"cpufreq/ondemand/ignore_nice_load"
            fi
        done
        return $status
}


** Changed in: powernowd (Ubuntu)
       Status: Invalid => Incomplete

-- 
powernowd doesn't start with init script
https://bugs.launchpad.net/bugs/153186
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to