Package: acpi-support-base Version: 0.141-2 Severity: normal Tags: patch Dear Maintainer,
The powerbtn-acpi-support.sh script in the acpi-support-base package will look for previous configuration scripts. Namely, it looks for powerbtn.sh and powerbtn.sh.dpkg-back. However, it does not check for power.sh. As I understand it, this script has not been used in a long time, but it is still present on some systems, while powerbtn.sh is not. Normally this is not an issue, but it does sometimes cause problems such as bug #694775. While power.sh calls CheckUPowerPolicy, powerbtn-acpi-support.sh does not. As a result, upowerd may be running, and certain desktop environments (such as MATE), may be expecting to receive power events, but they will get them too late. By the time upowerd sends the event, acpid will already be shutting the system down. I am attaching a proposed patch. It adds CheckUPowerPolicy to powerbtn-acpi-support.sh and also checks for the existence of power.sh. -Yury -- System Information: Debian Release: 7.0 APT prefers unstable APT policy: (990, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages acpi-support-base depends on: ii acpid 1:2.0.17-2 acpi-support-base recommends no packages. Versions of packages acpi-support-base suggests: ii acpi-support 0.141-2 ii consolekit 0.4.5-3.1 -- no debconf information
--- a/powerbtn-acpi-support.sh 2013-01-02 19:25:40.739291024 -0500 +++ b/powerbtn-acpi-support.sh 2013-01-02 19:35:50.942314991 -0500 @@ -15,7 +15,7 @@ . /usr/share/acpi-support/policy-funcs -if CheckPolicy; then +if { CheckPolicy || CheckUPowerPolicy; }; then exit 0 fi @@ -26,6 +26,9 @@ # Compatibility with old config script from acpid package # which is still around because it was changed by the admin /etc/acpi/powerbtn.sh.dpkg-bak +elif [ -x /etc/acpi/power.sh ] ; then + # Compatibility with another(?) old config script + /etc/acpi/power.sh else # Normal handling. /sbin/shutdown -h -P now "Power button pressed"