#!/bin/bash
#
# part of the powersave package
# Stefan Seyfried 2005
#
# this script is just used to switch away from X _before_ doing kernel
# level suspend, so we can do stuff before switching back to X after resume
#### common part############
# look into the example_event_script for an explanation.
# helper_functions sets variables and traps for unexpected exits.
. ${0%/*}/helper_functions

cd /var/lib || exit 1

# this works for me on a SONY VGN-FS115B, but you need to adapt this to
# your machine!
855resolution 38 1280 800
# change to the console we were on before suspend
read CONS < suspend2ram-fgconsole.state
chvt $CONS

#### common part############
$SCRIPT_RETURN $EV_ID 0 "$MYNAME"
EXIT 0
#### end of common part ####

