Subject: ./usr/sbin/laptop_mode: line 657: [: missing `]' when battery does not
report a capacity
Package: laptop-mode-tools
Version: 1.48-1
Severity: important
Tags: patch
*** Please type your report below this line ***
On my macbook sometimes the battery capacity reports
$ cat BAT0/energy_now BAT0/energy_full
0
0
If /usr/sbin/laptop_mode runs then it fails with:
$ sudo /etc/init.d/laptop-mode start
Enabling laptop mode.../usr/sbin/laptop_mode: line 657: [: missing `]'
done (WARNING: Battery does not report a capacity. Minimum battery
charge checking does not work without a design capacity.
WARNING: Battery does not report a design capacity. Auto hibernation
does not work without a design capacity.
enabled, active [unchanged]).
Note error in line 657:
if [ -z "$CAPACITY" -o "$CAPACITY" -eq 0] ; then
change to (add space):
if [ -z "$CAPACITY" -o "$CAPACITY" -eq 0 ] ; then
helps.
Maybe thats zsh specific cause i'm using zsh for root and user account, i am
not sure.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.29-1-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=UTF-8) (ignored: LC_ALL set to
de_DE.UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages laptop-mode-tools depends on:
ii lsb-base 3.2-22 Linux Standard Base 3.2 init scrip
ii psmisc 22.6-1 Utilities that use the proc filesy
ii util-linux 2.13.1.1-1 Miscellaneous system utilities
Versions of packages laptop-mode-tools recommends:
ii acpid 1.0.10-1 Utilities for using ACPI power man
ii ethtool 6+20090307-1 display or change Ethernet device
ii hal 0.5.12~git20090406.46dc48-2 Hardware Abstraction Layer
ii hdparm 8.9-3 tune hard disk parameters for high
ii net-tools 1.60-23 The NET-3 networking toolkit
ii sdparm 1.02-1 Output and modify SCSI device para
laptop-mode-tools suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]