core/tuxonice-userui/pm-utils-hook
philm 840a3b8fc8 linux: enable tuxonice optional
linux-3-CHAKRA: update PATCHCFG
extramodules: rebuild for new kernel
2012-02-18 08:48:16 +01:00

32 lines
488 B
Bash

#!/bin/bash
. /usr/lib/pm-utils/functions
case "$1" in
hibernate|suspend)
if [ -d "/sys/power/tuxonice" ]; then
suspend2ui="/sys/power/tuxonice/user_interface/program"
else
suspend2ui="/proc/suspend2/userui_program"
fi
if [ -e "${suspend2ui}" ]; then
names="text"
[ -d /etc/splash/tuxonice ] && names="fbsplash text"
for n in ${names} ; do
p="/usr/sbin/tuxoniceui_${n}"
if [ -x "${p}" ]; then
echo "${p}" > "${suspend2ui}"
break
fi
done
else
exit $NA
fi
;;
*)
exit $NA
;;
esac
exit $?