2008-05-09 20:13:02 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2008-12-18 14:17:48 +00:00
|
|
|
. /usr/lib/pm-utils/functions
|
2008-05-09 20:13:02 +00:00
|
|
|
|
|
|
|
case "$1" in
|
2008-12-18 14:17:48 +00:00
|
|
|
hibernate)
|
|
|
|
if test -n "$POWERDOWNFLAG" -a -f "$POWERDOWNFLAG" ; then
|
|
|
|
export UPSD_POWERDOWN_CONDITION=1
|
|
|
|
/etc/init.d/upsd try-powerdown
|
|
|
|
fi
|
|
|
|
stopservice upsd
|
|
|
|
;;
|
|
|
|
suspend)
|
2008-05-09 20:13:02 +00:00
|
|
|
stopservice upsd
|
|
|
|
;;
|
|
|
|
thaw|resume)
|
|
|
|
restartservice upsd
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|