Package: acpi-support
Version: 0.138-5
Severity: normal
Tags: patch

Mostly 'cat' replaced with builtin 'read'.

-- System Information:
Debian Release: 6.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages acpi-support depends on:
ii  acpi-fakekey                  0.138-5    tool to generate fake key events
ii  acpi-support-base             0.138-5    scripts for handling base ACPI eve
ii  acpid                         1:2.0.7-1  Advanced Configuration and Power I
ii  lsb-base                      3.2-26     Linux Standard Base 3.2 init scrip
ii  pm-utils                      1.3.0-3    utilities and scripts for power ma
ii  x11-xserver-utils             7.5+2      X server utilities

Versions of packages acpi-support recommends:
ii  dbus                          1.2.24-4   simple interprocess messaging syst
pn  radeontool                    <none>     (no description available)
ii  vbetool                       1.1-2      run real-mode video BIOS code to a
pn  xscreensaver | gnome-screensa <none>     (no description available)

Versions of packages acpi-support suggests:
ii  rfkill                        0.4-1      tool for enabling and disabling wi
ii  xinput                        1.5.3-1    Runtime configuration and test of

-- no debconf information


Cheers,

-- 
Cristian
--- debian/acpi-support/etc/acpi/ibm-wireless.sh.orig	2010-12-19 23:32:58.000000000 +0100
+++ debian/acpi-support/etc/acpi/ibm-wireless.sh	2010-12-25 16:51:16.000000000 +0100
@@ -1,8 +1,10 @@
 #!/bin/sh
 
 test -f /usr/share/acpi-support/state-funcs || exit 0
-if (! test -x /usr/sbin/rfkill)
+if ! test -x /usr/sbin/rfkill
 then
+# FIXME: default priority is 'user.notice', but the message text says "Error"
+#	 and exit status success?
 logger "Error: Please install package rfkill to enable toggling of wireless devices."
 exit 0
 fi
--- debian/acpi-support/etc/acpi/lid.sh.orig	2010-12-19 23:32:58.000000000 +0100
+++ debian/acpi-support/etc/acpi/lid.sh	2010-12-25 17:55:20.000000000 +0100
@@ -43,7 +43,7 @@ else
 	    if [ x$RADEON_LIGHT = xtrue ]; then
 		[ -x /usr/sbin/radeontool ] && radeontool light on
 	    fi
-	    if [ `pidof xscreensaver` ]; then
+	    if pidof xscreensaver >/dev/null 2>&1; then
 		su $user -s /bin/sh -c "xscreensaver-command -deactivate"
 	    fi
 	    case "$DISPLAY_DPMS" in
--- debian/acpi-support/etc/acpi/rotatescreen.sh.orig	2009-01-15 02:11:16.000000000 +0100
+++ debian/acpi-support/etc/acpi/rotatescreen.sh	2010-12-25 18:19:00.000000000 +0100
@@ -8,7 +8,7 @@ test -f /usr/share/acpi-support/key-cons
 . /usr/share/acpi-support/power-funcs
 
 if [ -f /var/lib/acpi-support/screen-rotation ] ; then
-  ROTATION=`cat /var/lib/acpi-support/screen-rotation`
+	read ROTATION </var/lib/acpi-support/screen-rotation
 fi
 
 case "$ROTATION" in
--- debian/acpi-support/etc/acpi/thinkpad-stretchortouchpad.sh.orig	2010-12-19 23:32:58.000000000 +0100
+++ debian/acpi-support/etc/acpi/thinkpad-stretchortouchpad.sh	2010-12-25 18:23:56.000000000 +0100
@@ -17,10 +17,10 @@ test -f /usr/share/acpi-support/key-cons
 
 toggle_touchpad=0
 
-system_manufactuer=`cat /sys/class/dmi/id/sys_vendor`
+read system_manufactuer </sys/class/dmi/id/sys_vendor
 case "$system_manufactuer" in
     IBM*)
-    system_version=`cat /sys/class/dmi/id/product_version`
+    read system_version </sys/class/dmi/id/product_version
     case "$system_version" in
 	ThinkPad\ [TXZ]60*)
 	toggle_touchpad=1
--- debian/acpi-support/etc/acpi/undock.sh.orig	2009-12-10 12:23:03.000000000 +0100
+++ debian/acpi-support/etc/acpi/undock.sh	2010-12-26 11:30:46.000000000 +0100
@@ -4,6 +4,7 @@ test -f /usr/share/acpi-support/key-cons
 
 for device in /sys/devices/platform/dock.*; do
 	[ -e "$device/type" ] || continue
-	[ x$(cat "$device/type") = xdock_station ] || continue
+	read dt <$dt
+	[ "$dt" = dock_station ] || continue
 	echo 1 > "$device/undock"
 done

Reply via email to