# vim:set ft=sh: run_hook () { fmtdevice () { echo "${1}:${2}"; } if [ -n "${resume}" ] && poll_device "${resume}"; then # Try resuming with tuxonice tuxoniceroot="/sys/power/tuxonice" if [ -d "${tuxoniceroot}" ]; then echo ${resume} > ${tuxoniceroot}/resume echo > ${tuxoniceroot}/do_resume fi # Try resuming with vanilla hibernation if [ -e "/sys/power/resume" ]; then eval $(/bin/parseblock "${resume}") fmtdevice ${BLOCKDEVICE} > /sys/power/resume fi fi }