On Mon, Nov 21, 2011 at 08:11:33PM -0000, Brad Evans wrote:
> I found the problem in the script  ..

> /usr/share/acpi-support/power-funcs

> I think that in line 9 ..

> user=$(who | awk "/:$displaynum)/ { print \$1; exit }")

> .. should be ...

> user=$(who | awk "/:$displaynum/ { print \$1; exit }")

No, the ) is intentionally part of the match, to preclude accidentally
matching display names that have the one we're looking for as a prefix.

The problem here is gawk and mawk having two different means of interpreting
), and awk being an alternative that could point at either one.  mawk is
installed by default, but it's likely that mawk's behavior here is actually
a bug and we probably don't want to rely on it; nor do we want acpi-support
to have to depend on gawk.

So I think the proper solution is to follow up on mawk's behavior and fix
mawk if necessary.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]


** Changed in: acpi-support (Ubuntu)
   Importance: Undecided => Medium

** Changed in: acpi-support (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/893271

Title:
  /etc/acpi/screenblank.sh shows awk syntax error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/893271/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to