diff options
Diffstat (limited to 'openembedded/packages/apmd/apmd-3.2.2/init')
-rwxr-xr-x | openembedded/packages/apmd/apmd-3.2.2/init | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/openembedded/packages/apmd/apmd-3.2.2/init b/openembedded/packages/apmd/apmd-3.2.2/init new file mode 100755 index 0000000000..f1098a752d --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/init | |||
@@ -0,0 +1,44 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Start or stop the Advanced Power Management daemon. | ||
4 | # | ||
5 | # Written by Dirk Eddelbuettel <edd@debian.org> | ||
6 | # Greatly modified by Avery Pennarun <apenwarr@debian.org> | ||
7 | # | ||
8 | # I think this script is now free of bashisms. | ||
9 | # Please correct me if I'm wrong! | ||
10 | |||
11 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
12 | |||
13 | [ -f /etc/default/rcS ] && . /etc/default/rcS | ||
14 | [ -f /etc/default/apmd ] && . /etc/default/apmd | ||
15 | |||
16 | case "$1" in | ||
17 | start) | ||
18 | echo -n "Starting advanced power management daemon: " | ||
19 | start-stop-daemon -S -x /usr/sbin/apmd -- \ | ||
20 | -P /etc/apm/apmd_proxy $APMD | ||
21 | if [ $? = 0 ]; then | ||
22 | echo "apmd." | ||
23 | else | ||
24 | echo "(failed.)" | ||
25 | fi | ||
26 | ;; | ||
27 | stop) | ||
28 | echo -n "Stopping advanced power management daemon: " | ||
29 | start-stop-daemon -K \ | ||
30 | -x /usr/sbin/apmd | ||
31 | echo "apmd." | ||
32 | ;; | ||
33 | restart|force-reload) | ||
34 | $0 stop | ||
35 | $0 start | ||
36 | exit | ||
37 | ;; | ||
38 | *) | ||
39 | echo "Usage: /etc/init.d/apmd {start|stop|restart|force-reload}" | ||
40 | exit 1 | ||
41 | ;; | ||
42 | esac | ||
43 | |||
44 | exit 0 | ||