Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461670 - app-laptop/laptop-mode-tools-1.62-r1: /usr/sbin/laptop_mode: line 1022: [: : integer expression expected
Summary: app-laptop/laptop-mode-tools-1.62-r1: /usr/sbin/laptop_mode: line 1022: [: : ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alon Bar-Lev (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-13 22:02 UTC by Martin Mokrejš
Modified: 2013-03-16 22:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2013-03-13 22:02:30 UTC
# /usr/sbin/laptop_mode status
/usr/sbin/laptop_mode: line 239: .: /etc/laptop-mode/conf.d/board-specific: is a directory
Warning: Configuration file /etc/laptop-mode/conf.d/board-specific/* is not readable, skipping.
Mounts:
   /dev/root on / type ext3 (rw,noatime,commit=0)
[cut]
/proc/acpi/button/lid/LID0/state:
   state:      open
 
/sys/class/power_supply/AC/online:
   1
 
/usr/sbin/laptop_mode: line 1022: [: : integer expression expected
/usr/sbin/laptop_mode: line 1033: [: : integer expression expected
enabled, not active
#
Comment 1 Martin Mokrejš 2013-03-13 22:04:16 UTC
And the line numbers:

1021 
1022     if [ "$INIT" -eq 0 ] ; then
1023             log "MSG" "Laptop mode "
1024     fi
1025 

1030     if [ -f /var/run/laptop-mode-tools/state ] ; then
1031             read WAS_ACTIVE WAS_ON_AC WAS_ACTIVATE_WITH_POSSIBLE_DATA_LOSS WAS_STATE < /var/run/laptop-mode-tools/state
1032             if [ "$WAS_STATE" != "" ] ; then
1033                     if [ "$WAS_ACTIVE" -eq "$ACTIVATE" -a "$WAS_ON_AC" -eq "$ON_AC" -a "$WAS_ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -a "$WAS_STATE" = "$STATE" -a "$FORCE" -eq 0 ] ; then
1034                             if [ "$WAS_ACTIVE" -eq 1 ] ; then
1035                                     log "MSG" "$STATE, active [unchanged]"
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2013-03-15 21:27:25 UTC
Workaround:

INIT=0 /usr/sbin/laptop_mode status
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2013-03-15 21:31:14 UTC
(In reply to comment #2)
> Workaround:
> 
> INIT=0 /usr/sbin/laptop_mode status

FORCE=0 INIT=0 /usr/sbin/laptop_mode status
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2013-03-16 22:53:58 UTC
Fixed in laptop-mode-tools-1.62-r2