]> git.pld-linux.org Git - packages/dbus.git/blobdiff - messagebus.init
- upstart: upstart_controlled early
[packages/dbus.git] / messagebus.init
index 79953697bd33ee8a2dc496356e47839c42d5aaf0..d70ccd6ab6fb03c3f8732c1076d19ef5d026d7dd 100644 (file)
@@ -12,6 +12,8 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+upstart_controlled
+
 # Get network config
 . /etc/sysconfig/network
 
@@ -32,6 +34,7 @@ start() {
                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
@@ -40,7 +43,10 @@ start() {
        dbus-uuidgen --ensure
        daemon --pidfile dbus.pid /usr/bin/dbus-daemon --system
        RETVAL=$?
-       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/messagebus
+       if [ $RETVAL -eq 0 ] ; then
+               touch /var/lock/subsys/messagebus
+               emit --no-wait started JOB=messagebus
+       fi
 }
 
 stop() {
@@ -50,9 +56,11 @@ stop() {
        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() {
This page took 0.040783 seconds and 4 git commands to generate.