[Bug 902473] [NEW] acpid's script "lid.sh" should *source* lid.sh.pre and lid.sh.post

Riccardo Murri riccardo.murri at gmail.com
Sat Dec 10 10:31:18 UTC 2011


Public bug reported:

As of  acpid 1:2.0.10-1ubuntu2.3, the support script "/etc/acpi/lid.sh"
allows users to define hooks "/etc/acpi/local/lid.sh.pre" and
"lid.sh.post".

However, these hooks are executed as shell commands, instead of being
sourced by the current shell.  Thus, the environment and the ACPI
functions is lost in the hook scripts, and one must set it up again.

Sourcing the hook scripts makes them more useful.

Trivial patch attached.

** Affects: acpid (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: oneiric wishlist

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

Title:
  acpid's script "lid.sh" should *source* lid.sh.pre and lid.sh.post

Status in “acpid” package in Ubuntu:
  New

Bug description:
  As of  acpid 1:2.0.10-1ubuntu2.3, the support script
  "/etc/acpi/lid.sh" allows users to define hooks
  "/etc/acpi/local/lid.sh.pre" and "lid.sh.post".

  However, these hooks are executed as shell commands, instead of being
  sourced by the current shell.  Thus, the environment and the ACPI
  functions is lost in the hook scripts, and one must set it up again.

  Sourcing the hook scripts makes them more useful.

  Trivial patch attached.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpid/+bug/902473/+subscriptions




More information about the foundations-bugs mailing list