Hello,
I wrote a small script for suspension that just works fine if called by root or user with sudo.
But it still won't work if called by acpid.
The /etc/acpi/events/lid.conf is:
event=button[/]lid
action=sudo /etc/acpi/actions/sleep.sh
I added to /etc/sudoers the following lines:
Host_Alias LOCALHOST=localhost
ALL LOCALHOST=NOPASSWD: /etc/acpi/actions/sleep.sh *
The script is situated in /etc/acpi/actions/sleep.sh and as i mention before works fine if called by user:
sudo /etc/acpi/actions/sleep.sh
But get the following when acpid calls it:
(logs)
[Thu Jul 21 18:56:41 2005] executing action "sudo /etc/acpi/actions/sleep.sh"
[Thu Jul 21 18:56:41 2005] BEGIN HANDLER MESSAGES
setresuid(ROOT_UID, 1, ROOT_UID): Operation not permitted
[Thu Jul 21 18:56:41 2005] END HANDLER MESSAGES
[Thu Jul 21 18:56:41 2005] action exited with status 1
Can anyone help to make it work when acpid calls it.
Thanks.