3 # messagebus The D-BUS systemwide message bus
7 # description: This is a daemon which broadcasts notifications of system
8 # events and other messages.
10 # pidfile: /var/run/dbus.pid
12 # Source function library
13 . /etc/rc.d/init.d/functions
18 . /etc/sysconfig/network
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network ]; then
23 msg_network_down "D-BUS Message bus"
31 # Check if the service is already running?
32 if [ -f /var/lock/subsys/messagebus ]; then
33 msg_already_running "D-BUS Message bus"
37 emit starting JOB=messagebus
38 msg_starting "D-BUS Message bus"
39 # if capability is modular, load it
40 if modinfo capability >/dev/null 2>&1; then
41 modprobe -s capability
44 daemon --pidfile dbus.pid /usr/bin/dbus-daemon --system
46 if [ $RETVAL -eq 0 ] ; then
47 touch /var/lock/subsys/messagebus
48 emit --no-wait started JOB=messagebus
53 if [ ! -f /var/lock/subsys/messagebus ]; then
54 msg_not_running "D-BUS Message bus"
59 emit stopping JOB=messagebus
60 msg_stopping "D-BUS Message bus"
61 killproc --pidfile dbus.pid dbus-daemon
62 rm -f /var/lock/subsys/messagebus /var/run/dbus.pid
63 emit --no-wait stopped JOB=messagebus
67 if [ ! -f /var/lock/subsys/messagebus ]; then
68 msg_not_running "D-BUS Message bus"
78 if [ ! -f /var/lock/subsys/messagebus ]; then
79 msg_not_running "D-BUS Message bus"
84 msg_reloading "D-BUS Message bus"
85 killproc --pidfile dbus.pid dbus-daemon -HUP
90 # See how we were called.
109 status --pidfile dbus.pid messagebus dbus-daemon
113 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"