+start() {
+ # Check if the service is already running?
+ if [ -f /var/lock/subsys/messagebus ]; then
+ msg_already_running "D-BUS Message bus"
+ return
+ fi
+
+ emit starting JOB=messagebus
+ msg_starting "D-BUS Message bus"
+ # if capability is modular, load it
+ if modinfo capability >/dev/null 2>&1; then
+ modprobe -s capability
+ fi
+ dbus-uuidgen --ensure
+ daemon --pidfile dbus.pid /usr/bin/dbus-daemon --system
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] ; then
+ touch /var/lock/subsys/messagebus
+ emit --no-wait started JOB=messagebus
+ fi
+}
+
+stop() {
+ if [ ! -f /var/lock/subsys/messagebus ]; then
+ msg_not_running "D-BUS Message bus"
+ return
+ fi
+
+ # Stop daemons.
+ emit stopping JOB=messagebus
+ msg_stopping "D-BUS Message bus"
+ killproc --pidfile dbus.pid dbus-daemon
+ rm -f /var/lock/subsys/messagebus /var/run/dbus.pid
+ emit --no-wait stopped JOB=messagebus
+}
+
+condrestart() {
+ if [ ! -f /var/lock/subsys/messagebus ]; then
+ msg_not_running "D-BUS Message bus"
+ RETVAL=$1
+ return
+ fi
+
+ stop
+ start
+}