Package: acpi-support
Version: 0.138-6
Severity: normal
Tags: patch
General case:
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
replaced with:
d=/tmp/.X11-unix
for x in $d/*; do
displaynum=${x#$d/X}
-- 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-6 tool to generate fake key events
ii acpi-support-base 0.138-6 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/examples/acpi/resume.d/90-xscreensaver.sh.orig 2011-01-08 00:13:56.000000000 +0100
+++ ./debian/examples/acpi/resume.d/90-xscreensaver.sh 2011-01-08 01:21:31.000000000 +0100
@@ -2,8 +2,9 @@
# now, we should poke xscreensaver so you get a dialog
if pidof xscreensaver > /dev/null; then
- for x in /tmp/.X11-unix/*; do
- displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+ d=/tmp/.X11-unix
+ for x in $d/*; do
+ displaynum=${x#$d/X}
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
--- ./debian/examples/acpi/suspendorhibernate.orig 2011-01-08 00:13:56.000000000 +0100
+++ ./debian/examples/acpi/suspendorhibernate 2011-01-08 01:19:14.000000000 +0100
@@ -170,8 +170,9 @@ for METHOD in $SUSPEND_METHODS; do
if [ x$LOCK_SCREEN = xtrue ]; then
if pidof xscreensaver > /dev/null; then
- for x in /tmp/.X11-unix/*; do
- displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+ d=/tmp/.X11-unix
+ for x in $d/*; do
+ displaynum=${x#$d/X}
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
--- ./rotatescreen.sh.orig 2011-01-08 00:14:47.000000000 +0100
+++ ./rotatescreen.sh 2011-01-08 01:14:22.000000000 +0100
@@ -20,8 +20,9 @@ case "$ROTATION" in
;;
esac
-for x in /tmp/.X11-unix/*; do
- displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+d=/tmp/.X11-unix
+for x in $d/*; do
+ displaynum=${x#$d/X}
getXconsole;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
--- ./screenblank.sh.orig 2011-01-08 00:14:47.000000000 +0100
+++ ./screenblank.sh 2011-01-08 01:23:15.000000000 +0100
@@ -6,8 +6,9 @@ test -f /usr/share/acpi-support/key-cons
. /usr/share/acpi-support/power-funcs
. /etc/default/acpi-support
-for x in /tmp/.X11-unix/*; do
- displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+d=/tmp/.X11-unix
+for x in $d/*; do
+ displaynum=${x#$d/X}
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
--- ./sleep.sh.orig 2011-01-08 00:14:47.000000000 +0100
+++ ./sleep.sh 2011-01-08 01:27:47.000000000 +0100
@@ -27,8 +27,9 @@ fi
if [ x$LOCK_SCREEN = xtrue ]; then
if pidof xscreensaver > /dev/null; then
- for x in /tmp/.X11-unix/*; do
- displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+ d=/tmp/.X11-unix
+ for x in $d/*; do
+ displaynum=${x#$d/X}
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"