aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tlp/tlp.initd
diff options
context:
space:
mode:
authorIvan Tham <pickfire@riseup.net>2017-04-02 22:43:21 +0800
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-04-03 13:07:37 +0000
commit8e58fef0213394503965faf20d69f661aa9109e4 (patch)
tree5f2fa2060df708f3add494e58c6a971bbc00db3f /testing/tlp/tlp.initd
parente09788cb2d8fb7a4c54cadafd6e0ee03238e0903 (diff)
downloadaports-8e58fef0213394503965faf20d69f661aa9109e4.tar.bz2
aports-8e58fef0213394503965faf20d69f661aa9109e4.tar.xz
testing/tlp: fix tlp.initd
Diffstat (limited to 'testing/tlp/tlp.initd')
-rwxr-xr-xtesting/tlp/tlp.initd23
1 files changed, 7 insertions, 16 deletions
diff --git a/testing/tlp/tlp.initd b/testing/tlp/tlp.initd
index 4f29bd3a62..05b4c3b975 100755
--- a/testing/tlp/tlp.initd
+++ b/testing/tlp/tlp.initd
@@ -1,24 +1,15 @@
#!/sbin/openrc-run
description="Initialize tlp"
-command=/usr/sbin/tlp
-
-extra_commands="force-reload"
+extra_started_commands="force_reload"
depend() {
need localmount
}
-status() {
- tlp-stat -s
-}
-
-# TODO: I don't know how to write this initd
-case "$1" in
- start|\
- stop|\
- restart|\
- force-reload)
- tlp init $1
- ;;
-esac
+status() { tlp-stat -s; }
+# TODO: keep the following in one line
+start() { tlp init start; }
+stop() { tlp init stop; }
+restart() { tlp init restart; }
+force_reload() { tlp init force-reload; }