Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
* Bart Samwel [EMAIL PROTECTED] [2005-11-24 20:05]: Well, I've since switched sponsors because of this, but my new sponsor seems just as busy. I'd be delighted if you'd do the upload. The source package is here: http://www.xs4all.nl/~bsamwel/laptop_mode/tools/downloads/debian/src OK, this looks good. I've uploaded this now. You should probably delete laptop-mode-tools-1.11/etc/laptop-mode/laptop-mode.conf.orig from the .tar file in the next release. Thanks very much for helping me out! (BTW, if you're less busy than the other guys, would you mind sponsoring some more uploads afterwards?) Yeah, feel free to contact me if your other sponsors don't reply. -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
* Bart Samwel [EMAIL PROTECTED] [2005-11-06 21:26]: 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 Is your sponsor still busy? If so, I can probably sponsor this upload. -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
Martin Michlmayr wrote: * Bart Samwel [EMAIL PROTECTED] [2005-11-06 21:26]: 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 Is your sponsor still busy? If so, I can probably sponsor this upload. Well, I've since switched sponsors because of this, but my new sponsor seems just as busy. I'd be delighted if you'd do the upload. The source package is here: http://www.xs4all.nl/~bsamwel/laptop_mode/tools/downloads/debian/src Thanks very much for helping me out! (BTW, if you're less busy than the other guys, would you mind sponsoring some more uploads afterwards?) --Bart -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
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 _ Comunica in tempo reale http://messenger.msn.com/beta -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
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]
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
as you can see i don't know too much shell scripting :-D in fact after i've modified and rebooted the machine i saw many messages about the option PARTITION in laptop-mode.conf, so i thought that this solution was wrong... i've installed the 1.11-1 version now...thank you for that link and for the explanation about the difference! _ Personalizza MSN Messenger con sfondi e fotografie! http://www.ilovemessenger.msn.it/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
Le0n_84 debianized wrote: as you can see i don't know too much shell scripting :-D in fact after i've modified and rebooted the machine i saw many messages about the option PARTITION in laptop-mode.conf, so i thought that this solution was wrong... i've installed the 1.11-1 version now...thank you for that link and for the explanation about the difference! No problem, hope it works for you now! --Bart -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
I've noticed this bug as well. Quite an irksome thing to see on startup/shutdown. :) $VERBOSE is going to be set in the environment, because it's a standard rcS variable in Debian. The /usr/sbin/laptop_mode script should be fixed to not assume that this is evidence that the default verbosity setting needs to be overridden. Perhaps the easiest way to achieve this is simply by unsetting VERBOSE at the top of the script. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. [EMAIL PROTECTED] http://www.debian.org/ signature.asc Description: Digital signature
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
Steve Langasek wrote: I've noticed this bug as well. Quite an irksome thing to see on startup/shutdown. :) $VERBOSE is going to be set in the environment, because it's a standard rcS variable in Debian. The /usr/sbin/laptop_mode script should be fixed to not assume that this is evidence that the default verbosity setting needs to be overridden. Perhaps the easiest way to achieve this is simply by unsetting VERBOSE at the top of the script. That seems like the easiest solution. Thanks. :) --Bart -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
Jean-Damien Durand wrote: Package: laptop-mode-tools Version: 1.10-1 Severity: normal FYI I got the error mentionned in subject with version 1.10-1. Did you set VERBOSE_OUTPUT=yes? Use 1 instead. None of the laptop mode tools settings work with yes/no, they're all 1/0. --Bart -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
Dear Bart, Funnily enough, VERBOSE_OUTPUT is not set. C.f. attachment. Okay, I added an echo to a temp file to know what was going on: this is because the variable $VERBOSE itself is set to yes - and I got difficulties to find why!! But I may have understood: My /etc/init.d/rcS contains VERBOSE=yes: % grep VERBOSE /etc/default/rcS # Set VERBOSE to no if you would like a more quiet bootup. VERBOSE=yes This seems to get translated into acpid environment. Indeed, if I look to the environment of my acpid process: % less /proc/`pidof acpid`/environ [EMAIL PROTECTED]/dev/[EMAIL PROTECTED]@[EMAIL PROTECTED]/sbin:/bin:/usr/sbin:/usr/[EMAIL PROTECTED]@[EMAIL PROTECTED]/[EMAIL PROTECTED]@[EMAIL PROTECTED]@HOME=/[EMAIL PROTECTED]@[EMAIL PROTECTED]/sbin/start-stop-daemon^@ So I end up with acpid calling laptop_mode action with VERBOSE setted to yes, which translates to VERBOSE_OUTPUT setted to yes ! Hmmm... I am 99.999% sure I never touched /etc/init.d/rcS, and I do not know if VERBOSE=yes is the debian's default - is it !? Anyway, this might be a dependency that can hurt laptop_mode !? Thanks, Cheers, JD. BS Jean-Damien Durand wrote: BS Package: laptop-mode-tools BS Version: 1.10-1 BS Severity: normal BS BS FYI I got the error mentionned in subject with version 1.10-1. BS BS Did you set VERBOSE_OUTPUT=yes? Use 1 instead. None of the laptop mode BS tools settings work with yes/no, they're all 1/0. BS BS --Bart BS # Configuration for Laptop Mode Tools # # There is a system to the configuration setting names: #CONTROL_something=0/1 Determines whether Laptop Mode Tools controls something #LM_something=value Value of something when laptop mode is active #NOLM_something=valueValue of something when laptop mode is NOT active #AC_something=value Value of something when the computer is running on AC power #BATT_something=valueValue of something when the computer is running on battery power # # There can be combinations of LM_/NOLM_ and AC_/BATT_ prefixes, but the available prefixes # are different for each setting. The available ones are documented in the manual page, # laptop-mode.conf(8). If there is no LM_/NOLM_ in a setting name, then the value # is used independently of laptop mode state, and similarly, if there is no AC_/BATT_, # then the value is used independently of power state. # Set this to 1 if you want to see a lot of information when you start/stop laptop_mode. VERBOSE_OUTPUT=0 ### # When to enable laptop mode ### # Enable laptop mode when on battery power. ENABLE_LAPTOP_MODE_ON_BATTERY=1 # Enable laptop mode when on AC power. ENABLE_LAPTOP_MODE_ON_AC=0 # Enable laptop mode when the laptop's lid is closed, even when we're on # AC power? This only works on ACPI machines. ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0 # Disable laptop mode when the number of minutes of battery that you have left # goes below this threshold. (Note that some batteries do not report a discharge # rate, and this option will not have any effect on those batteries. Use the battery # charge options instead.) MINIMUM_BATTERY_MINUTES=7 # Automatically disable laptop mode when the remaining charge in your battery # goes below this value. There is a configuration value in mWh and in mAh, # the one that is used depends on how your battery reports its capacity. MINIMUM_BATTERY_CHARGE_MAH=100 MINIMUM_BATTERY_CHARGE_MWH=500 ### # Controlled hard drives and partitions ### # The drives that laptop mode controls. # Separate them by a space, e.g. HD=/dev/hda /dev/hdb. The default is a # wildcard, which will get you all your IDE and SCSI/SATA drives. HD=/dev/[hs]d[abcdefgh] # The partitions (or mount points) that laptop mode controls. # Separate the values by spaces. Use auto to indicate all partitions on drives # listed in HD. You can add things to auto, e.g. auto /dev/hdc3. You can # also specify mount points, e.g. /mnt/data. PARTITIONS=auto ### # Hard drive behaviour settings ### # Maximum time, in seconds, of work that you are prepared to lose when your # system crashes or power runs out. This is the maximum time that Laptop Mode # will keep unsaved data waiting in memory before spinning up your hard drive. LM_BATT_MAX_LOST_WORK_SECONDS=600 LM_AC_MAX_LOST_WORK_SECONDS=360 # Should laptop mode tools control readahead? CONTROL_READAHEAD=1 # Read-ahead, in kilobytes. You can spin down the disk while playing MP3/OGG # by setting the disk readahead to a reasonable size, e.g. 3072 (3 MB). Effectively, # the
Bug#328118: /usr/sbin/laptop_mode: line 199: [: yes: integer expression expected
Package: laptop-mode-tools Version: 1.10-1 Severity: normal FYI I got the error mentionned in subject with version 1.10-1. Cheers, JD. -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12.4-mppe-mppc Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages laptop-mode-tools depends on: ii powermgmt-base1.22 Common utils and configs for power Versions of packages laptop-mode-tools recommends: ii acpid 1.0.4-2Utilities for using ACPI power man ii apmd 3.2.2-3Utilities for Advanced Power Manag ii hdparm6.1-5 tune hard disk parameters for high -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]