summaryrefslogtreecommitdiff
path: root/nonsystemd/tlp-openrc/tlp.initd
blob: 827cafdb6fedd8b274701a7874b01ce0b0a76cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

description="TLP start/stop actions"

depend() {
	after modules

	# sysfs is required (bat thresholds); localmount:/usr
	need sysfs localmount

	# thinkpad-radiosw (USE=deprecated)
	use acpid

	after NetworkManager dbus bluetooth

	# run after xdm to avoid bluetooth/wwan/... race-condition with gdm
	after xdm
}

start()   { /usr/bin/tlp init start; }
stop()    { /usr/bin/tlp init stop; }
restart() { /usr/bin/tlp init restart; }