#!/bin/sh # # hal-system-power-hibernate-sunos.sh # # Licensed under the Academic Free License version 2.1 # proc unsupported { echo org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported >&2 echo No hibernate method found >&2 exit 1 } if test -x "/usr/sbin/uadmin" { /usr/sbin/uadmin 3 0 setvar RET = "$Status" } else { unsupported } #Refresh devices as a resume can do funny things for type in [button battery ac_adapter] { setvar devices = $(hal-find-by-capability --capability $type) for device in [$devices] { dbus-send --system --print-reply --dest=org.freedesktop.Hal \ $device org.freedesktop.Hal.Device.Rescan } } exit $RET