File: 00powersave

package info (click to toggle)
pm-utils 1.4.1-15
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,420 kB
  • ctags: 193
  • sloc: sh: 3,069; xml: 1,035; makefile: 178; ansic: 152
file content (18 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

. "${PM_FUNCTIONS}"

# do not run pm-powersave on ARM during suspend; the 1.5 seconds that it takes
# to run it don't nearly compensate the potentially slightly slower suspend
# operation in low power mode
ARCH=`uname -m`

command_exists pm-powersave || exit $NA

case $1 in
    suspend|hibernate) [ "$ARCH" != "${ARCH#arm}" ] || pm-powersave false ;;
    resume|thaw)       pm-powersave ;;
    *) exit $NA ;;
esac
exit 0