aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tlp
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
parente09788cb2d8fb7a4c54cadafd6e0ee03238e0903 (diff)
downloadaports-8e58fef0213394503965faf20d69f661aa9109e4.tar.bz2
aports-8e58fef0213394503965faf20d69f661aa9109e4.tar.xz
testing/tlp: fix tlp.initd
Diffstat (limited to 'testing/tlp')
-rw-r--r--testing/tlp/APKBUILD4
-rwxr-xr-xtesting/tlp/tlp.initd23
2 files changed, 9 insertions, 18 deletions
diff --git a/testing/tlp/APKBUILD b/testing/tlp/APKBUILD
index 1202fc63e1..838ac3b3b7 100644
--- a/testing/tlp/APKBUILD
+++ b/testing/tlp/APKBUILD
@@ -3,7 +3,7 @@
pkgname=tlp
_pkgname=TLP
pkgver=0.9
-pkgrel=0
+pkgrel=1
pkgdesc="Linux Advanced Power Management"
url="http://linrunner.de/en/tlp/tlp.html"
arch="noarch"
@@ -46,4 +46,4 @@ bashcomp() {
}
sha512sums="126d11739f2438eb9cf8c496fc7d8cecfb05b578c2ae99264ee53d9fb85dfeab59456483867f21c621d0db6793468f7b0bd77868e999801115e157e1ba383610 TLP-0.9.tar.gz
-26b910acf3987c76fbf9fd24a3fbc95e8cd4b06fedf5b53c17147c9b371a99e1250c30f55bedcc817072f72145dc3d3f059dc9306af984c8d855fa22f2b22837 tlp.initd"
+e6de216b2540413812711b3304cdc29c8729d527080cfd747ba382db50166dd21c6c27ff467f9f2a967e92007c7a311b00e88262952c34a22f417578c66cf4e7 tlp.initd"
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; }