summaryrefslogtreecommitdiff
path: root/user/acpid/acpid.initd
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2018-12-08 17:31:16 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2018-12-08 17:31:16 +0000
commit39af0df5ca8d7acd233d6cc872d184c41fbe6737 (patch)
tree4ff075126e3bf22fc26c7e58a484f27c44ec7f48 /user/acpid/acpid.initd
parent4227be08fb2c9d6d668132b008a110ce4f6852a9 (diff)
parent6e5fd9cb2156eec3b6e8f71de371239d1c9af1b7 (diff)
downloadpackages-39af0df5ca8d7acd233d6cc872d184c41fbe6737.tar.gz
packages-39af0df5ca8d7acd233d6cc872d184c41fbe6737.tar.bz2
packages-39af0df5ca8d7acd233d6cc872d184c41fbe6737.tar.xz
packages-39af0df5ca8d7acd233d6cc872d184c41fbe6737.zip
Merge branch 'master' into 'master'
user/acpid: new package This merge requests adds the `acpid` daemon, which listens for ACPI events such as lid switches triggering or special purpose keyboard keys being pressed, and can be configured to take actions upon these events. This is the first package I have made for Adelie, and the APKBUILD was created using `newapkbuild(8)` and is otherwise a mechanical conversion of Arch Linux's PKGBUILD with a sideways look at the APKBUILD of `system/at` for reference. Other distributions customarily include a default "catch-all" event handler which logs all ACPI events to syslog using `logger(1)`, so I have included one as part of the package. I have copied the OpenRC init script and configuration script from Gentoo's gitweb; `acpid` itself is GPL 2 or later (according to the comments in the source code), while the OpenRC init script appears to be GPL 2 only. I'm not sure how to proceed here, however I have marked the package licence as "GPL-2.0+" -- some guidance on this would be appreciated. See merge request !125
Diffstat (limited to 'user/acpid/acpid.initd')
-rw-r--r--user/acpid/acpid.initd19
1 files changed, 19 insertions, 0 deletions
diff --git a/user/acpid/acpid.initd b/user/acpid/acpid.initd
new file mode 100644
index 000000000..f8076d43b
--- /dev/null
+++ b/user/acpid/acpid.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+command="/usr/sbin/acpid"
+command_args="${ACPID_ARGS}"
+description="Daemon for Advanced Configuration and Power Interface"
+
+depend() {
+ need localmount
+ use logger
+}
+
+reload() {
+ ebegin "Reloading acpid configuration"
+ start-stop-daemon --exec $command --signal HUP
+ eend $?
+}