[Pkg-acpi-devel] Bug#603738: acpi-support-base: CheckPolicy patch missed usage in powerbtn-acpi-support.sh
Alexandre Rossi
alexandre.rossi at gmail.com
Tue Nov 16 20:51:38 UTC 2010
Package: acpi-support-base
Version: 0.137-6
Severity: normal
Tags: patch
Hi,
While investigating why my laptop was shutting down after resume, I found a
syntax error in powerbtn-acpi-support.sh.
Due to the change in how CheckPolicy returns values, the test should be fixed
to test the return value instead of the echo'ed value.
The script appended to this report works as expected.
Please follow-up for more info.
Cheers,
Alex
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.36-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages acpi-support-base depends on:
ii acpid 1:2.0.7-1 Advanced Configuration and Power I
ii console-tools [console-uti 1:0.2.3dbs-69 Linux console and font utilities
acpi-support-base recommends no packages.
Versions of packages acpi-support-base suggests:
pn acpi-support <none> (no description available)
-- Configuration Files:
/etc/acpi/powerbtn-acpi-support.sh changed:
if [ -f /etc/acpi/events/powerbtn -o -f /etc/acpi/events/powerbtn.dpkg-bak ] ; then
logger Acpi-support not handling power button, acpid handler exists at /etc/acpi/events/powerbtn or /etc/acpi/events/powerbtn.dpkg-bak.
exit 0
fi
[ -e /usr/share/acpi-support/policy-funcs ] || exit 0
. /usr/share/acpi-support/policy-funcs
if CheckPolicy; then
exit 0
fi
if [ -x /etc/acpi/powerbtn.sh ] ; then
# Compatibility with old config script from acpid package
/etc/acpi/powerbtn.sh
elif [ -x /etc/acpi/powerbtn.sh.dpkg-bak ] ; then
# 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
else
# Normal handling.
/sbin/shutdown -h -P now "Power button pressed"
fi
-- no debconf information
More information about the Pkg-acpi-devel
mailing list