[Bug 893271] Re: /etc/acpi/screenblank.sh shows awk syntax error
Steve Langasek
steve.langasek at canonical.com
Wed Nov 23 22:57:29 UTC 2011
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/
slangasek at ubuntu.com vorlon at debian.org
** 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
Foundations Bugs, which is subscribed to acpi-support in Ubuntu.
https://bugs.launchpad.net/bugs/893271
Title:
/etc/acpi/screenblank.sh shows awk syntax error
Status in “acpi-support” package in Ubuntu:
Triaged
Bug description:
When running /etc/acpi/screenblank.sh, I get ..
awk: line 1: regular expression compile failed (missing '(')
:0)
Screen does go blank though..
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: acpi-support 0.138
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
NonfreeKernelModules: wl
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Mon Nov 21 14:27:21 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: acpi-support
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/893271/+subscriptions
More information about the foundations-bugs
mailing list