9ec10c9555
Hi, Here is a new package called acpid and a related kernel module kmod-button. Its main pupose is to listen for acpi events and run a user defined script. For now only powerdown is possible. I only tested this under the X86 architecture. Maybe somebody find that useful too. regards. thomas git-svn-id: svn://svn.openwrt.org/openwrt/packages@30991 3c298f89-4303-0410-b956-a3cf2f4a3e73
26 lines
445 B
Bash
26 lines
445 B
Bash
#!/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
|
|
}
|