[Pkg-acpi-devel] Bug#559911: acpi-support fails to start if dbus environment contains variables with non-ascii values

Євгеній Євгеній
Mon Dec 7 19:20:50 UTC 2009

Package: acpi-support
Version: 0.130-1
Severity: normal
Tags: patch

I'm trying to do this on my machine:

  # LANG=C /etc/init.d/acpi-support start
  Starting acpi_fakekey daemon....
  Checking battery state...local: 9: (standard: bad variable name
  -su: Binary: not found

With sh -x:

  + /etc/acpi/power.sh
  local: 9: (standard: bad variable name
  -su: Binary: not found


  LANG=C sh -x /etc/acpi/power.sh
  + cat /proc/2764/environ
  + local DBUS_SESS=Binary file (standard input) matches
  local: 1: (standard: bad variable name

I think this is because of this variable:

  DEBEMAIL=Євгеній Мещеряков <eugen at debian.org>

Adding -a to grep fixes the problem (see attached patch).

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages acpi-support depends on:
ii  acpi-support-base             0.130-1    scripts for handling base ACPI eve
ii  acpid                         1.0.10-4   Advanced Configuration and Power I
ii  dmidecode                     2.9-1.1    Dump Desktop Management Interface 
ii  finger                        0.17-13    user information lookup program
ii  hdparm                        9.15-1     tune hard disk parameters for high
ii  laptop-detect                 0.13.7     attempt to detect a laptop
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries
ii  lsb-base                      3.2-23     Linux Standard Base 3.2 init scrip
ii  pm-utils              utilities and scripts for power ma
ii  powermgmt-base                1.31       Common utils and configs for power
ii  x11-xserver-utils             7.5+1      X server utilities

Versions of packages acpi-support recommends:
ii  dbus                          1.2.16-2   simple interprocess messaging syst
ii  hal                           0.5.13-6   Hardware Abstraction Layer
ii  nvclock                       0.8b4-1    Allows you to overclock your nVidi
ii  radeontool                    1.5-5      utility to control ATI Radeon back

acpi-support suggests no packages.

-- no debconf information
-------------- next part --------------
--- /tmp/policy-funcs	2009-12-07 20:18:55.643070790 +0100
+++ /usr/share/acpi-support/policy-funcs	2009-12-07 20:19:15.489729366 +0100
@@ -26,7 +26,7 @@
 	for p in $(pidof kded4); do
 		test -r /proc/$p/environ || continue
-		local DBUS_SESS=$(cat /proc/$p/environ | grep -z "DBUS_SESSION_BUS_ADDRESS=")
+		local DBUS_SESS=$(cat /proc/$p/environ | grep -a -z "DBUS_SESSION_BUS_ADDRESS=")
 		test "$DBUS_SESS" != "" || continue
 		(su - $(ps -o user= $p) -s /bin/sh -c "$DBUS_SESS dbus-send --print-reply --dest=org.kde.kded /kded org.kde.kded.loadedModules" | grep -q powerdevil) && return 0

More information about the Pkg-acpi-devel mailing list