X-Reportbug-Version: 3.40
X-Debbugs-Cc: [EMAIL PROTECTED]
Package: acpid
Version: 1.0.6-9
Severity: normal


Hello!

I just verified that /etc/acpi/powerbtn.sh is wrong; it cannot
query dcop, as it doesn't know where (or which, if multiple users
are logged on) session to query.

I verified that with a patch:

===== cut here =====

diff -u powerbtn.sh.r125 powerbtn.sh.local
--- powerbtn.sh         Rev. 125        (Tue May 20 08:51:18 2008)
+++ powerbtn.sh         Local version   (Tue Jun  3 17:55:50 2008)
@@ -3,12 +3,17 @@
 # Initiates a shutdown when the power putton has been
 # pressed.

+exec > /tmp/.powerbtn.log 2>&1
+
+DEBUG=echo
+
 # Skip if we just in the middle of resuming.
 test -f /var/lock/acpisleep && exit 0

 # If gnome-power-manager, kpowersave or klaptopdaemon are running, let
 # them handle policy This is effectively the same as 'acpi-support's
 # '/usr/share/acpi-support/policy-funcs' file.
+$DEBUG /usr/bin/dcop kded kded loadedModules

 if pidof gnome-power-manager kpowersave > /dev/null ||
   (pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded 
kded loadedModules | grep -q klaptopdaemon) ; then
@@ -21,13 +26,13 @@ if ps -Af | grep -q '[k]desktop' && pido
     KDESES=`pidof dcopserver | wc -w`
     if [ $KDESES -eq 1 ] ; then
         # single KDE session -> ask user
-        /usr/bin/dcop --all-sessions --all-users ksmserver ksmserver logout 1 
2 0
+        $DEBUG /usr/bin/dcop --all-sessions --all-users ksmserver ksmserver 
logout 1 2 0
         exit 0
     else
         # more than one KDE session - just send shutdown signal to all of them
-        /usr/bin/dcop --all-sessions --all-users ksmserver ksmserver logout 0 
2 0 && exit 0
+        $DEBUG /usr/bin/dcop --all-sessions --all-users ksmserver ksmserver 
logout 0 2 0 && exit 0
     fi
 fi

 # If all else failed, just initiate a plain shutdown.
-/sbin/shutdown -h now "Power button pressed"
+$DEBUG /sbin/shutdown -h now "Power button pressed"

===== cut here =====

and I get the expected
        ERROR: Couldn't attach to DCOP server!

If you're running kpowersave it will handle that itself; but klaptopdaemon
won't work.


Regards,

Phil


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

Kernel: Linux 2.6.24-1-amd64 (SMP w/1 CPU core)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages acpid depends on:
ii  libc6                         2.7-12     GNU C Library: Shared libraries
ii  lsb-base                      3.2-12     Linux Standard Base 3.2 init scrip
ii  module-init-tools             3.4-1      tools for managing Linux kernel mo

acpid recommends no packages.

-- no debconf information

-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to