summaryrefslogtreecommitdiff
path: root/pm/sleep.d/55battery
blob: ec24ebe5a81d21d022c3737a30123c4b4b958b19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

. "${PM_FUNCTIONS}"

resume_batteries()
{
	for x in $(hal-find-by-capability --capability battery 2>/dev/null); do
		dbus-send --print-reply --system --reply-timeout=2000 \
			--dest=org.freedesktop.Hal "$x" \
			org.freedesktop.Hal.Device.Rescan "string:$x"
	done
}

case "$1" in
	resume|thaw)
		resume_batteries
		;;
esac