laptop-mode verbose is not working

Bug #429938 reported by Hans van den Bogert on 2009-09-15
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
laptop-mode-tools (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: laptop-mode-tools

using karmic
using version 1.47 of laptop-mode-tools
I changed the /etc/laptop-mode/laptop-mode.conf to boolean VERBOSE_OUTPUT=1
the commented text above it said this wouldgive me detailed info during startup, yet I can't see anything but the usual
starting laptop...... [ ok ]

I altered a modules script(/usr/share/laptop-mode/modules) to echo it's OUTPUT variable, but it's says /dev/stdout, which is correct.
one thing I do find odd is that also in the modules scripts the variable LM_VERBOSE has the value "[ 1 = 1 ]" which is a string, although it's being used as a boolean guard in the form of:
$LM_VERBOSE && echo useful stuff >> $OUTPUT

description: updated
Tormod Volden (tormodvolden) wrote :

Thanks for your report. Which script is using LM_VERBOSE?

Hans van den Bogert (hbogert) wrote :

the modules scripts in /usr/share/laptop-mode-tools/modules use LM_VERBOSE, which is somewhere derived from VERBOSE in /etc/laptop-mode/laptop-mode.conf and mapped to LM_VERBOSE in /usr/sbin/laptop_mode

description: updated
Tormod Volden (tormodvolden) wrote :

Thanks (I've was looking on the wrong machine...). Yes, LM_VERBOSE is set to "[ 1 = 1 ]" which will be evaluated as a test statement, because /bin/sh will substitute the string before executing the command list. So this should work.

In my (untouched) /etc/laptop-mode/laptop-mode.conf it is VERBOSE_OUTPUT=0 and not "VERBOSE=0" but that shouldn't matter if only one is set or they are the same. Are you sure you don't have both set?

Tormod Volden (tormodvolden) wrote :

If you run "sudo /usr/sbin/laptop_mode start" manually, do you see the verbose output?

description: updated
Hans van den Bogert (hbogert) wrote :

you were right about post #3, and I DO now see verbose output when run with laptop_mode directly

Is it also known that the iwlagn driver does not work with current script, as it has no power_level device file in /sys/class/net/$IF/device/?

Tormod Volden (tormodvolden) wrote :

If you don't see verbose output during boot, it can be something related to how the init script is run and how /dev/stdout is set for it. Try changing OUTPUT in /usr/sbin/laptop_mode to a normal file instead.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers