>>>hibernate.sh<<< #!/bin/bash . /etc/default/acpi-support . /usr/share/acpi-support/power-funcs if [ x$HIBERNATE_SCRIPT = xtrue ] && [ -x /usr/sbin/hibernate ]; then /usr/sbin/hibernate $HIBERNATE_ARGS ; exit $?; fi . /usr/share/acpi-support/policy-funcs if [ x$ACPI_HIBERNATE != xtrue ] && [ x$1 != xforce ]; then exit; fi if [ x$ACPI_USE_HIBERNATE_SCRIPT = xtrue ] ; then hibernate $ACPI_HIBERNATE_ARGS exit $? fi # Unset video posting - it's not needed for suspend to disk unset POST_VIDEO . /etc/acpi/prepare.sh #if [ x$LOCK_SCREEN = xtrue ]; then # for x in /tmp/.X11-unix/*; do # displaynum=`echo $x | sed s#/tmp/.X11-unix/X##` # getXuser; # if [ x"$XAUTHORITY" != x"" ]; then # export DISPLAY=":$displaynum" # . /usr/share/acpi-support/screenblank # fi # done #fi echo -n $HIBERNATE_MODE >/sys/power/disk echo -n "disk" >/sys/power/state $LAPTOP_MODE stop . /etc/acpi/resume.sh