Le0n_84 debianized wrote:
i've solve this problem editing /usr/sbin/laptop_mode and changing
" if [ "$VERBOSE_OUTPUT" -ne 0 ] ; then "
with
" if [ "$VERBOSE_OUTPUT" != 0 ] ; then "

next time i've reboot the machine it told me
"Sun Nov  6 18:38:17 2005: Enabling laptop mode: Laptop Mode Tools 1.10
Sun Nov 6 18:38:17 2005: On AC power: Setting action to "stop" because ENABLE_LAPTOP
_MODE_ON_AC is not set."
instead of
" /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected "

Thank you for your contribution. Unfortunately, your solution is not correct: it only hides the symptoms instead of fixing the problem. In bash script, the "!=" operator means string comparison, while the "-ne" operator indicates integer comparison. The value of VERBOSE_OUTPUT, at the point where the error occurs, is "yes", which is completely wrong, unexpected by the design of laptop-mode-tools. Changing "-ne" into "!=" hides this fact (as indeed "yes" != "0"), but does not fix the cause of the problem -- the wrong value of VERBOSE_OUTPUT. In fact, as Steve Langasek noted earlier in the comments of this bug report, the value of VERBOSE_OUTPUT came from a completely different place, which set it to yes/no and not to 0/1: the Debian init system sets a variable called VERBOSE, which laptop-mode-tools interprets as equivalent to VERBOSE_OUTPUT because of backward compatibility with an earlier config version. The correct solution is to ignore the setting of VERBOSE, not to change the style of comparison.

FYI, the bug is fixed in the 1.11 version of laptop-mode-tools, which you can download at the laptop-mode-tools homepage:

http://www.xs4all.nl/~bsamwel/laptop_mode/tools

It has not been uploaded yet because my sponsor has been busy.

--Bart


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to