updated on Sat Jan 21 16:18:39 UTC 2012
[aur-mirror.git] / tuxonice-userui / pm-utils-hook
blobdf10f0d87cc84eae6542e5d87151479223fa68e4
1 #!/bin/bash
3 . /usr/lib/pm-utils/functions
5 case "$1" in
6 hibernate|suspend)
7 if [ -d "/sys/power/tuxonice" ]; then
8 suspend2ui="/sys/power/tuxonice/user_interface/program"
9 else
10 suspend2ui="/proc/suspend2/userui_program"
12 if [ -e "${suspend2ui}" ]; then
13 names="text"
14 [ -d /etc/splash/tuxonice ] && names="fbsplash text"
15 for n in ${names} ; do
16 p="/usr/sbin/tuxoniceui_${n}"
17 if [ -x "${p}" ]; then
18 echo "${p}" > "${suspend2ui}"
19 break
21 done
22 else
23 exit $NA
27 exit $NA
29 esac
31 exit $?