22 lines
318 B
Bash
22 lines
318 B
Bash
#!/bin/bash
|
|
|
|
. /usr/lib/pm-utils/functions
|
|
|
|
case "$1" in
|
|
hibernate)
|
|
if test -n "$POWERDOWNFLAG" -a -f "$POWERDOWNFLAG" ; then
|
|
export UPSD_POWERDOWN_CONDITION=1
|
|
/etc/init.d/upsd try-powerdown
|
|
fi
|
|
stopservice upsd
|
|
;;
|
|
suspend)
|
|
stopservice upsd
|
|
;;
|
|
thaw|resume)
|
|
restartservice upsd
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|