pass ARCH down to uClibc
[buildroot.git] / package / dbus / S97messagebus
blobbddb3b9dd1f60adfe21713dc6d99fa393f72dad2
1 #!/bin/sh
3 # messagebus: The D-BUS systemwide message bus
5 # chkconfig: 345 97 03
6 # description: This is a daemon which broadcasts notifications of system events \
7 # and other messages. See http://www.freedesktop.org/software/dbus/
9 # processname: dbus-daemon
10 # pidfile: /var/run/messagebus.pid
13 # Sanity checks.
14 [ -x /usr/bin/dbus-daemon ] || exit 0
16 # Create needed directories.
17 [ -d /var/run/dbus ] || mkdir -p /var/run/dbus
18 [ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
20 RETVAL=0
22 start() {
23 echo -n "Starting system message bus: "
25 dbus-daemon --system
26 RETVAL=$?
27 echo "done"
28 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbus-daemon
31 stop() {
32 echo -n "Stopping system message bus: "
34 ## we don't want to kill all the per-user $processname, we want
35 ## to use the pid file *only*; because we use the fake nonexistent
36 ## program name "$servicename" that should be safe-ish
37 killall dbus-daemon
38 RETVAL=$?
39 echo "done"
40 if [ $RETVAL -eq 0 ]; then
41 rm -f /var/lock/subsys/dbus-daemon
42 rm -f /var/run/messagebus.pid
46 # See how we were called.
47 case "$1" in
48 start)
49 start
51 stop)
52 stop
54 status)
55 status $processname
56 RETVAL=$?
58 restart)
59 stop
60 start
62 condrestart)
63 if [ -f /var/lock/subsys/$servicename ]; then
64 stop
65 start
68 reload)
69 echo "Message bus can't reload its configuration, you have to restart it"
70 RETVAL=$?
73 echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
75 esac
76 exit $RETVAL