diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-06-11 12:18:01 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-06-18 16:22:13 +0200 |
commit | 28db1773524eb763569939d4066e32dbf50c69a0 (patch) | |
tree | 964e2f4165b48179d7ac39ac8d472788d60f99f0 /projectroot/etc/init.d/acpid | |
parent | 878707bd943a04fc8e3a55a151499359e81ce780 (diff) | |
download | ptxdist-28db1773524eb763569939d4066e32dbf50c69a0.tar.gz ptxdist-28db1773524eb763569939d4066e32dbf50c69a0.tar.xz |
generic: rename generic -> projectroot
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'projectroot/etc/init.d/acpid')
-rw-r--r-- | projectroot/etc/init.d/acpid | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/projectroot/etc/init.d/acpid b/projectroot/etc/init.d/acpid new file mode 100644 index 000000000..81e97631b --- /dev/null +++ b/projectroot/etc/init.d/acpid @@ -0,0 +1,41 @@ +#!/bin/sh + +DAEMON=/usr/sbin/acpid +PIDFILE=/var/run/acpid.pid + +case $1 in +start) + echo "starting acpid" + + # don't use acpid if proc/acpi is not there. + if [ ! -e /proc/acpi/event ]; then + echo "failed" + echo "error: proc/acpi/event not here" + exit 1 + fi + + # Start the acpid daemon to continually + # watch for, and act on, acpievents + echo -n "Starting acpid..." + start-stop-daemon --start --oknodo \ + --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS + + if [ "$?" = "0" ]; then + echo "done" + exit 0 + else + echo "failed" + exit 1 + fi + + ;; +stop) + echo "Stopping acpid" + start-stop-daemon --stop --oknodo --quiet \ + --pidfile $PIDFILE --exec $DAEMON + ;; +*) + echo "usage: $0 [start|stop]" + ;; +esac + |