acpid: switch to systemd, drop openrc support.
This commit is contained in:
parent
c1fa3c0138
commit
cac0f30e9e
5 changed files with 22 additions and 52 deletions
srcpkgs/acpid
|
@ -1,6 +0,0 @@
|
||||||
# /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_OPTIONS=""
|
|
|
@ -1,43 +0,0 @@
|
||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2007 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/sys-power/acpid/files/acpid-1.0.6-init.d,v 1.3 2009/01/19 04:48:49 vapier Exp $
|
|
||||||
|
|
||||||
opts="reload"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need localmount
|
|
||||||
use logger
|
|
||||||
before hald
|
|
||||||
}
|
|
||||||
|
|
||||||
checkconfig() {
|
|
||||||
if [ ! -e /proc/acpi ] ; then
|
|
||||||
eerror "ACPI support has not been compiled into the kernel"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
if [ ! -e /proc/acpi/event ]; then
|
|
||||||
eerror "Your kernel needs CONFIG_ACPI_PROC_EVENT support"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
checkconfig || return 1
|
|
||||||
|
|
||||||
ebegin "Starting acpid"
|
|
||||||
start-stop-daemon --start --quiet --exec /usr/sbin/acpid -- ${ACPID_OPTIONS}
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping acpid"
|
|
||||||
start-stop-daemon --stop --exec /usr/sbin/acpid
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
reload() {
|
|
||||||
ebegin "Reloading acpid configuration"
|
|
||||||
start-stop-daemon --stop --oknodo --exec /usr/sbin/acpid --signal HUP
|
|
||||||
eend $?
|
|
||||||
}
|
|
10
srcpkgs/acpid/files/acpid.service
Normal file
10
srcpkgs/acpid/files/acpid.service
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ACPI Event Daemon
|
||||||
|
Requires=acpid.socket
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/acpid -f
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Also=acpid.socket
|
8
srcpkgs/acpid/files/acpid.socket
Normal file
8
srcpkgs/acpid/files/acpid.socket
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ACPID Listen Socket
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=/run/acpid.socket
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
|
@ -1,6 +1,7 @@
|
||||||
# Template file for 'acpid'
|
# Template file for 'acpid'
|
||||||
pkgname=acpid
|
pkgname=acpid
|
||||||
version=2.0.12
|
version=2.0.12
|
||||||
|
revision=1
|
||||||
homepage="http://tedfelix.com/linux/acpid-netlink.html"
|
homepage="http://tedfelix.com/linux/acpid-netlink.html"
|
||||||
distfiles="http://tedfelix.com/linux/acpid-$version.tar.gz"
|
distfiles="http://tedfelix.com/linux/acpid-$version.tar.gz"
|
||||||
build_style=gnu_makefile
|
build_style=gnu_makefile
|
||||||
|
@ -15,14 +16,14 @@ long_desc="
|
||||||
input layer (mouse, keyboard, power button, etc...). This version of acpid
|
input layer (mouse, keyboard, power button, etc...). This version of acpid
|
||||||
supports netlink and the input layer."
|
supports netlink and the input layer."
|
||||||
|
|
||||||
openrc_services="acpid default true"
|
systemd_services="acpid.service"
|
||||||
conf_files="/etc/conf.d/acpid"
|
conf_files="/etc/conf.d/acpid"
|
||||||
Add_dependency run glibc
|
Add_dependency run glibc
|
||||||
|
|
||||||
post_install()
|
post_install()
|
||||||
{
|
{
|
||||||
vinstall ${FILESDIR}/acpid.rc 755 etc/init.d acpid
|
vinstall ${FILESDIR}/acpid.service 644 lib/systemd/system
|
||||||
vinstall ${FILESDIR}/acpid.confd 644 etc/conf.d acpid
|
vinstall ${FILESDIR}/acpid.socket 644 lib/systemd/system
|
||||||
vinstall ${FILESDIR}/handler.sh 755 etc/acpi
|
vinstall ${FILESDIR}/handler.sh 755 etc/acpi
|
||||||
vinstall ${FILESDIR}/anything 644 etc/acpi/events
|
vinstall ${FILESDIR}/anything 644 etc/acpi/events
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue