Packaging Request #1603
[tlp-openrc] Add package to PCR
Status:
open
Priority:
feature
Assignee:
% Done:
0%
Description
This has always confused me, why is there no tlp init script for OpenRC? It's included in Gentoo and Atrix and should be pretty easy to add. Hyperbola devs probably need this too.
Steps to create:
- cd into /etc/init.d/
- Create a blank file called "tlp" (e.g. "nano tlp").
- Paste the following script:
#!/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; }
- Correct the permissions of the new init script with "chmod 755 tlp"
- Run this sed command "sed -i -e 's/\r//g' /etc/init.d/tlp" (for some reason OpenRC gives me a permissions error if I don't do this ¯\_(ツ)_/¯).
- Now test with "rc-service tlp restart".
History
Updated by Megver83 about 6 years ago
- Assignee set to Megver83
I'll look at this later, this week maybe