[Debian-eeepc-devel] Bug#532631: eeepc-acpi-scripts: [ -e $SOME_CTL ] tests broken when empty variables $SOME_CTL

Tanguy Ortolo tanguy+debian at ortolo.eu
Wed Jun 10 14:47:26 UTC 2009


Package: eeepc-acpi-scripts
Version: 1.1.0
Severity: normal
Tags: patch

Hello,

I had some problems with my Eee PC 901, that does not have a bluetooth
kill switch in /proc/ or /sys/: even if there is a modprobe-based
fallback, pressing the corresponding hotkey always left it enabled.

I finally found the problem: $BT_CTL was empty, and tested with
[ -e $BT_CTL ], that (with dash as /bin/sh) is [ -e ], that is... true!
"$BT_CTL" (the empty string) should be used instead of $BT_CTL
(nothing).

I found several such tests to be corrected: here is a global, recursive
patch over them.

Regards,

-- 
Tanguy Ortolo
-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eeepc-acpi-scripts-1.1.0.patch
Type: text/x-diff
Size: 7336 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-eeepc-devel/attachments/20090610/ce2f3a2a/attachment.patch>


More information about the Debian-eeepc-devel mailing list