Package: laptop-mode-tools Version: 1.46-1 Severity: normal Tags: patch Hi,
usb-autosuspend fails with the following error message: /usr/share/laptop-mode-tools/modules/usb-autosuspend: line 20: echo: write error: Invalid argument The attached patch solves the issue. Hannes -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (990, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.28.2 (SMP w/2 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages laptop-mode-tools depends on: ii lsb-base 3.2-20 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.8-1 Utilities for using ACPI power man ii ethtool 6+20080913-1 display or change Ethernet device pn hal <none> (no description available) ii hdparm 8.9-3 tune hard disk parameters for high pn sdparm <none> (no description available) laptop-mode-tools suggests no packages. -- no debconf information
--- /usr/share/laptop-mode-tools/modules/usb-autosuspend.orig 2009-01-26 07:31:24.000000000 +0100 +++ /usr/share/laptop-mode-tools/modules/usb-autosuspend 2009-01-26 07:31:31.000000000 +0100 @@ -17,7 +17,7 @@ do usb_device=`basename $usb_device`; if [ -f /sys/bus/usb/devices/$usb_device/power/autosuspend ]; then - echo AUTOSUSPEND_TIMEOUT > /sys/bus/usb/devices/$usb_device/power/autosuspend; + echo $AUTOSUSPEND_TIMEOUT > /sys/bus/usb/devices/$usb_device/power/autosuspend; $LM_VERBOSE && echo "Enabling auto suspend mode for usb device $usb_device." >> $OUTPUT else $LM_VERBOSE && echo "Not enabling auto suspend mode for usb device $usb_device -- /sys/bus/usb/devices/$usb_device/power/autosuspend not present." >> $OUTPUT