mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
acpid: Import from oldpackages, update to latest version, add myself as
maintainer, ensure musl compatibility - with acpid kvm based setups can react on acpi shutdown and reboot actions Signed-off-by: heil <heil@terminal-consulting.de>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
if [ "$ACTION" = add ] && [ "$DEVICENAME" = event0 ]; then
|
||||
( /etc/init.d/acpid/stop; sleep 3; /usr/sbin/acpid )&
|
||||
fi
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/bin/ash /etc/rc.common
|
||||
# Copyright (C) 2009-2010 OpenWrt.org
|
||||
|
||||
START=99
|
||||
STOP=80
|
||||
|
||||
ACPID_BIN="/usr/sbin/acpid"
|
||||
ACPID_PID="/var/run/acpid.pid"
|
||||
|
||||
start() {
|
||||
[ -x "$ACPID_BIN" ] || return 1
|
||||
start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID
|
||||
}
|
||||
|
||||
boot() {
|
||||
# Do nothing on boot
|
||||
[ -x "$ACPID_BIN" ] || return 1
|
||||
start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID
|
||||
exit 0
|
||||
}
|
||||
|
||||
stop() {
|
||||
service_kill ${ACPID_BIN##*/} $ACPID_PID
|
||||
rm -f $ACPID_PID
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
# This is a sample ACPID configuration
|
||||
|
||||
event=button/power.*
|
||||
action=/sbin/poweroff
|
||||
|
||||
Reference in New Issue
Block a user