Annotation of /trunk/hal/hald.rc
Parent Directory | Revision Log
Revision 81 -
(hide annotations)
(download)
Fri Oct 20 17:46:27 2006 UTC (18 years ago) by niro
File size: 900 byte(s)
Fri Oct 20 17:46:27 2006 UTC (18 years ago) by niro
File size: 900 byte(s)
- allow hal to process acpi events - enabled logging to syslog
1 | niro | 18 | #!/bin/bash |
2 | niro | 81 | # $Header: /root/magellan-cvs/src/hal/hald.rc,v 1.2 2006-10-20 17:46:27 niro Exp $ |
3 | niro | 18 | |
4 | #%rlevels: 0:k 1:k 6:k 7:s | ||
5 | #%start: 58 | ||
6 | #%stop: 45 | ||
7 | |||
8 | #deps | ||
9 | #%needs: | ||
10 | #%before: | ||
11 | #%after: | ||
12 | |||
13 | source /etc/sysconfig/rc | ||
14 | source $rc_functions | ||
15 | |||
16 | |||
17 | case "$1" in | ||
18 | start) | ||
19 | echo -e ${COLOREDSTAR}"Starting Hardware Abstraction Layer daemon ..." | ||
20 | niro | 81 | |
21 | # allow hal to process acpi events | ||
22 | if [ -f /proc/acpi/event ] | ||
23 | then | ||
24 | chgrp haldaemon /proc/acpi/event | ||
25 | chmod 440 /proc/acpi/event | ||
26 | fi | ||
27 | |||
28 | start-stop-daemon --start -q --exec /usr/sbin/hald -- --use-syslog | ||
29 | niro | 18 | evaluate_retval |
30 | splash svc_started splash 0 | ||
31 | ;; | ||
32 | |||
33 | stop) | ||
34 | echo -e ${COLOREDSTAR}"Stopping Hardware Abstraction Layer daemon ..." | ||
35 | niro | 81 | start-stop-daemon --stop -q --pidfile /var/run/hald/hald.pid |
36 | niro | 18 | evaluate_retval |
37 | splash svc_stopped splash 0 | ||
38 | ;; | ||
39 | |||
40 | restart) | ||
41 | $0 stop | ||
42 | sleep 1 | ||
43 | $0 start | ||
44 | ;; | ||
45 | |||
46 | *) | ||
47 | echo "Usage: $0 {start|stop|restart}" | ||
48 | exit 1 | ||
49 | ;; | ||
50 | esac |