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
16 . /etc/sysconfig/network
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20 if [ ! -f /var/lock/subsys/network ]; then
21 msg_network_down "D-BUS Message bus"
29 # Check if the service is already running?
30 if [ -f /var/lock/subsys/messagebus ]; then
31 msg_already_running "D-BUS Message bus"
35 msg_starting "D-BUS Message bus"
36 # if capability is modular, load it
37 if modinfo capability >/dev/null 2>&1; then
38 modprobe -s capability
41 daemon --pidfile dbus.pid --redirfds /usr/bin/dbus-daemon --system
43 if [ $RETVAL -eq 0 ] ; then
44 touch /var/lock/subsys/messagebus
49 if [ ! -f /var/lock/subsys/messagebus ]; then
50 msg_not_running "D-BUS Message bus"
55 msg_stopping "D-BUS Message bus"
56 killproc --pidfile dbus.pid dbus-daemon
57 rm -f /var/lock/subsys/messagebus /var/run/dbus.pid
61 if [ ! -f /var/lock/subsys/messagebus ]; then
62 msg_not_running "D-BUS Message bus"
72 if [ ! -f /var/lock/subsys/messagebus ]; then
73 msg_not_running "D-BUS Message bus"
78 msg_reloading "D-BUS Message bus"
79 killproc --pidfile dbus.pid dbus-daemon -HUP
84 # See how we were called.
103 status --pidfile dbus.pid messagebus dbus-daemon
107 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"