summarylogtreecommitdiffstats
path: root/pm-utils-hook
blob: fa85394c4bc400de51d3fb3d8fa53da3ef51e5f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

. /usr/lib/pm-utils/functions

case "$1" in
    hibernate|suspend)
        suspend2ui="/sys/power/tuxonice/user_interface/program"
        [ -e "${suspend2ui}" ] || exit $NA

        p="/usr/sbin/tuxoniceui"
        opt=""
        [ -d /etc/splash/tuxonice ] && opt=" -f"

        echo "${p}${opt}" > "${suspend2ui}"
        ;;
    *)
        exit $NA
        ;;
esac

exit $?