2 if [ -e "/etc/acpi/power.lock" ]; then
6 if grep -q mem
/sys
/power
/state
; then
8 # BEGIN SUSPEND SEQUENCE
9 # save the brightness value
10 BRN
=$
(cat /sys
/class
/backlight
/eeepc
/actual_brightness
)
12 # set the fsb to its normal speed
15 # flush the buffers to disk
18 # change virtual terminal to not screw up X
21 # put us into suspend state
22 echo -n "mem" > /sys
/power
/state
24 # BEGIN WAKEUP SEQUENCE
26 #Ugly but effective way to restore screen
27 /usr
/sbin
/vbetool post
30 # restore backlight BRN
32 echo $BRN > /sys
/class
/backlight
/eeepc
/brightness
34 # choose right fsb, lcd backlight, devices power state accordingly to power source
35 #/usr/local/bin/eeeautoclock.sh &