summaryrefslogtreecommitdiff
path: root/pm/sleep.d/55battery
blob: 0486c88ca2672fbaf80d5947eee0c67c977660c0 (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 --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