diff options
Diffstat (limited to 'sys-power/tlp/files')
-rw-r--r-- | sys-power/tlp/files/tlp-1.5.0-Makefile.patch | 18 | ||||
-rw-r--r-- | sys-power/tlp/files/tlp.init | 28 |
2 files changed, 46 insertions, 0 deletions
diff --git a/sys-power/tlp/files/tlp-1.5.0-Makefile.patch b/sys-power/tlp/files/tlp-1.5.0-Makefile.patch new file mode 100644 index 000000000..58667ee21 --- /dev/null +++ b/sys-power/tlp/files/tlp-1.5.0-Makefile.patch @@ -0,0 +1,18 @@ +diff --git a/Makefile b/Makefile +index b81451c..d154b6b 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,10 +14,10 @@ TLP_CONFDIR ?= /etc/tlp.d + TLP_CONFDEF ?= /usr/share/tlp/defaults.conf + TLP_CONFREN ?= /usr/share/tlp/rename.conf + TLP_CONF ?= /etc/default/tlp +-TLP_SYSD ?= /lib/systemd/system +-TLP_SDSL ?= /lib/systemd/system-sleep ++TLP_SYSD ?= /@LIBDIR@/systemd/system ++TLP_SDSL ?= /@LIBDIR@/systemd/system-sleep + TLP_SYSV ?= /etc/init.d +-TLP_ELOD ?= /lib/elogind/system-sleep ++TLP_ELOD ?= /@LIBDIR@/elogind/system-sleep + TLP_SHCPL ?= /usr/share/bash-completion/completions + TLP_MAN ?= /usr/share/man + TLP_META ?= /usr/share/metainfo diff --git a/sys-power/tlp/files/tlp.init b/sys-power/tlp/files/tlp.init new file mode 100644 index 000000000..f50de9029 --- /dev/null +++ b/sys-power/tlp/files/tlp.init @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +command=/usr/sbin/tlp +name="TLP" +extra_started_commands="reload stat" + +depend() { + need udev +} + +start() { + ebegin "Starting tlp..." + $command init start + eend $? +} + +reload() { + ebegin "Reloading tlp's configuration..." + $command start + eend $? +} + +stop() { + elog "Reboot to stop tlp." +} + +stat() { + /usr/bin/tlp-stat +} |