Drive, I think the problem is resolved.
1. I rename the the lid.sh to lid.sh.old (as you told me to)
2.I check the script of my lid2.sh and there was a problem with my condition. Dive, you told me to use
but i check the syntax and it is:
Code:
if [$lidstate = "closed"] .....
3. Restarted my laptop and now it goes to standby on close then goes up when I open the lid.
--------------------------------------
Summary / Reference
--------------------------------------
my /etc/acpi/acpi_handler.sh :
Code:
#!/bin/sh
# Default acpi script that takes an entry for all actions
IFS=${IFS}/
set $@
case "$1" in
button)
case "$2" in
power) /sbin/init 0
;;
lid) /etc/acpi/lid2.sh
;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
my /etc/acpi/lid2.sh:
Code:
#!/bin/bash
lidstate=`cat /proc/acpi/button/lid/LID/state | awk '{print $2}'`
if [ $lidstate = "closed" ]
then
sync
echo -n mem > /sys/power/state
else
logger "ACPI: Lid open. Not going into suspend"
fi
* don't forget to make your script -->> chmod +x lid2.sh
my
etc/acpi/events/default is the standard file.
Hope it will help people later on!!!
Will write a final post later.