Package: acpi-support
Followup-For: Bug #497999
Looking a littler closer, there are more problems than just this typo.
*) This loop is attempting to match "$displaynum" rather than ":$displaynum"
*) Variables inside the "| while read" construct are only local to within the
loop (probably because it's executed in some sort of subshell or something), so
$user never actually gets set. I tried to export it, but that didn't work
eiither. Instead, the patch attached (again to be applied to power-funcs file
itself) reverts back to something closer to the old method, but using "w"
instead of "finger" as this was noted to be more reliable.
Kevin
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (600, 'unstable'), (500, 'testing'), (400, 'stable'), (300,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.27-rc5-amd64.010 (SMP w/2 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1) (ignored: LC_ALL set to
en_GB)
Shell: /bin/sh linked to /bin/dash
Versions of packages acpi-support depends on:
ii acpi-support-base 0.109-7 scripts for handling base ACPI eve
ii acpid 1.0.6-10 Utilities for using ACPI power man
ii dmidecode 2.9-1 Dump Desktop Management Interface
ii finger 0.17-12 user information lookup program
ii hdparm 8.9-2 tune hard disk parameters for high
ii laptop-detect 0.13.7 attempt to detect a laptop
ii libc6 2.7-13 GNU C Library: Shared libraries
ii lsb-base 3.2-20 Linux Standard Base 3.2 init scrip
ii powermgmt-base 1.30+nmu1 Common utils and configs for power
ii vbetool 1.0-3 run real-mode video BIOS code to a
ii x11-xserver-utils 7.3+5 X server utilities
Versions of packages acpi-support recommends:
ii dbus 1.2.1-3 simple interprocess messaging syst
ii hal 0.5.11-3 Hardware Abstraction Layer
pn nvclock <none> (no description available)
ii pm-utils 1.1.2.4-1 utilities and scripts for power ma
pn radeontool <none> (no description available)
Versions of packages acpi-support suggests:
ii laptop-mode-tools 1.45-1 Scripts to spin down hard drive an
-- no debconf information
11,16c11
< w -hs | while read -r THIS_USER THIS_TTY THIS_FROM DUMMY_REMAINDER; do
< if [ "$THIS_TTY" = "$displaynum" -o "$THIS_FROM" =
"$displaynum"] ; then
< user=$THIS_USER
< break
< fi
< done
---
> user=`w -hs | grep -m1 ":$displaynum " | awk '{print $1}'`