Re: acpid shutdown?

Matt Foster <[email protected]>
Newsgroups gmane.linux.hardware.sony
Message-ID <[email protected]>
Yeah, you are. The 'action' is a program to run, so you'll need the full
path, provided you have a program called poweroff.

For example, in my events file, I have
event=button[ /]power
action=/etc/acpi/powerbtn.sh

where the shell script has the following contents:

#!/bin/sh
# /etc/acpi/poweroff.sh
# Initiates a shutdown when the power putton has been
# pressed.

if ps -Af | grep -q '[k]desktop' && test -f /usr/bin/dcop
then
    dcop --all-users ksmserver ksmserver logout 0 2 0 && exit 0
fi

/sbin/init 0

The last line is the important one, and I think that you could just use
action=/sbin/telinit 0 .

HTH

Matt

Quoting Jason Cox ([email protected]):
> Greetings all,
> 
> I have set up acpid and it detects the events when I press the power
> button or close the lid on my Z1GP, however, it does not execute the
> shutdown command.
> 
> /etc/acpi/events/power:
> 
> event=button power.*
> action=poweroff
> 
> Am I missing something?
> 
> 
> 
> _______________________________________________
> Linux-sony mailing list: [email protected]
> Subscribe/Unsubscribe: http://returntonature.com/mailman/listinfo/linux-sony
> Linux-Sony Documentation: http://returntonature.com/linux/phpwiki
> 
-- 
Matt Foster

[email protected]
[email protected]
http://www.mattfoster.clara.co.uk 
icq: 106411042
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.