summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/acpid/acpid/init
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:38:32 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:50:20 +0100
commite2e6f6fe07049f33cb6348780fa975162752e421 (patch)
treeb1813295411235d1297a0ed642b1346b24fdfb12 /meta/recipes-bsp/acpid/acpid/init
downloadpoky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
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