# vim:set ft=sh: # TODO encrypted swap partition if resume2 begins with 'swap:' run_hook () { fmtdevice () { echo "${1}:${2}"; } # Try resuming with TuxOnIce if [ -d "/sys/power/tuxonice" -a -n "${resume2}" ]; then suspend2root="/sys/power/tuxonice" echo ${resume2} > ${suspend2root}/resume echo > ${suspend2root}/do_resume fi # Try resuming with swsusp if [ -e "/sys/power/resume" -a -n "${resume}" ]; then dev_t=$( /bin/parseblock "${resume}" ) eval ${dev_t} fmtdevice ${BLOCKDEVICE} > /sys/power/resume fi }