Cross Reference: hal-system-power-hibernate-sunos.sh
xref
: /
illumos-gate
/
usr
/
src
/
cmd
/
hal
/
tools
/
sunos
/
hal-system-power-hibernate-sunos.sh
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
#!/
bin
/
sh
#
#
hal-system-power-hibernate-sunos.sh
#
# Licensed under the Academic Free License version 2.1
#
unsupported
()
{
echo
org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported
>&
2
echo
No
hibernate
method
found
>&
2
exit
1
}
if
[ -x
"/
usr
/
sbin
/
uadmin
"
] ;
then
/
usr
/
sbin
/
uadmin
3
0
RET
=$?
else
unsupported
fi
#Refresh devices as a resume can do funny things
for
type
in
button
battery
ac_adapter
do
devices
=
`
hal
-
find
-
by
-
capability
--
capability
$type
`
for
device
in
$devices
do
dbus
-
send
--
system
--
print
-
reply
--
dest
=
org.freedesktop.Hal
\
$device
org.freedesktop.Hal.Device.Rescan
done
done
exit
$RET