summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/acpid/acpid/init
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/acpid/acpid/init')
-rwxr-xr-xmeta/recipes-bsp/acpid/acpid/init30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-bsp/acpid/acpid/init b/meta/recipes-bsp/acpid/acpid/init
new file mode 100755
index 0000000000..9f2c0d48d0
--- /dev/null
+++ b/meta/recipes-bsp/acpid/acpid/init
@@ -0,0 +1,30 @@
1#! /bin/sh -e
2
3test -x /usr/sbin/acpid || exit 0
4test -d /proc/acpi || exit 0
5
6case "$1" in
7 start)
8 echo -n "Starting Advanced Configuration and Power Interface daemon: "
9 if [ ! -d /etc/acpi/events ]; then
10 echo "There is not any rule configuration file."
11 else
12 start-stop-daemon -S -x /usr/sbin/acpid -- -c /etc/acpi/events
13 echo "acpid."
14 fi
15 ;;
16 stop)
17 echo -n "Stopping Advanced Configuration and Power Interface daemon: "
18 start-stop-daemon -K -x /usr/sbin/acpid
19 echo "acpid."
20 ;;
21 restart|force-reload)
22 $0 stop
23 $0 start
24 ;;
25 *)
26 echo "Usage: /etc/init.d/acpid {start|stop|restart|force-reload}"
27 exit 1
28esac
29
30exit 0