#!/bin/bash

. /usr/lib/pm-utils/functions

suspend() {
    # Send a signal to cheese to indicate suspend
	echo "true" > /opt/lindvd-1.5.hp/HP_LINDVD_SUSPEND
}

resume() {
    # Send a signal to cheese to indicate resume
	echo "false" > /opt/lindvd-1.5.hp/HP_LINDVD_SUSPEND
}

case "$1" in
	hibernate|suspend)
		suspend
		;;
	thaw|resume)
		resume
		;;
	*)
		;;
esac

exit $?
