summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-05-19 09:53:59 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-05-19 09:53:59 +0000
commit3812a3dfbfa4a9a36428a1cf473cbf74c3fca095 (patch)
tree1d7a7d778e974ebf671bbecfae5d060bd5020f5a /sys-power/acpid/files
parentVersion bump and proxy-maint (bug 416173, thanks Alex Buell), EAPI-4, respect... (diff)
downloadhistorical-3812a3dfbfa4a9a36428a1cf473cbf74c3fca095.tar.gz
historical-3812a3dfbfa4a9a36428a1cf473cbf74c3fca095.tar.bz2
historical-3812a3dfbfa4a9a36428a1cf473cbf74c3fca095.zip
New socket activation based systemd files as per user request. Ensure /run is present in pkg_postinst() for acpid.socket file.
Package-Manager: portage-2.2.0_alpha107/cvs/Linux x86_64
Diffstat (limited to 'sys-power/acpid/files')
-rw-r--r--sys-power/acpid/files/acpid-2.0.16-conf.d6
-rw-r--r--sys-power/acpid/files/acpid-2.0.16-init.d21
-rw-r--r--sys-power/acpid/files/systemd/acpid.service7
-rw-r--r--sys-power/acpid/files/systemd/acpid.socket8
4 files changed, 42 insertions, 0 deletions
diff --git a/sys-power/acpid/files/acpid-2.0.16-conf.d b/sys-power/acpid/files/acpid-2.0.16-conf.d
new file mode 100644
index 000000000000..9aadb4cd814a
--- /dev/null
+++ b/sys-power/acpid/files/acpid-2.0.16-conf.d
@@ -0,0 +1,6 @@
+# /etc/conf.d/acpid: config file for /etc/init.d/acpid
+
+# Options to pass to the acpid daemon.
+# See the acpid(8) man page for more info.
+
+ACPID_ARGS=""
diff --git a/sys-power/acpid/files/acpid-2.0.16-init.d b/sys-power/acpid/files/acpid-2.0.16-init.d
new file mode 100644
index 000000000000..412a265fc56b
--- /dev/null
+++ b/sys-power/acpid/files/acpid-2.0.16-init.d
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-2.0.16-init.d,v 1.1 2012/05/19 09:53:59 ssuominen Exp $
+
+extra_started_commands="reload"
+command="/usr/sbin/acpid"
+command_args="${ACPID_ARGS}"
+start_stop_daemon_args="--quiet"
+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 $?
+}
diff --git a/sys-power/acpid/files/systemd/acpid.service b/sys-power/acpid/files/systemd/acpid.service
new file mode 100644
index 000000000000..8f8c7e4bede4
--- /dev/null
+++ b/sys-power/acpid/files/systemd/acpid.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=ACPI Event Daemon
+Requires=acpid.socket
+
+[Service]
+EnvironmentFile=/etc/conf.d/acpid
+ExecStart=/usr/sbin/acpid -f $ACPID_ARGS
diff --git a/sys-power/acpid/files/systemd/acpid.socket b/sys-power/acpid/files/systemd/acpid.socket
new file mode 100644
index 000000000000..5fa2e027de8a
--- /dev/null
+++ b/sys-power/acpid/files/systemd/acpid.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=ACPI Event Daemon Listen Socket
+
+[Socket]
+ListenStream=/run/acpid.socket
+
+[Install]
+WantedBy=sockets.target