X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=messagebus.init;h=7d4dcc92fc402c0f26871267c80008cca00f9b5a;hb=1aecc028bee9b6f931b2cec16356a78644fd9ea9;hp=d877103755cfc0dd41c61c4d06a1536d253aa4d4;hpb=000b5b5b40c482633c9700683753d5c2fa404b76;p=packages%2Fdbus.git diff --git a/messagebus.init b/messagebus.init index d877103..7d4dcc9 100644 --- a/messagebus.init +++ b/messagebus.init @@ -29,8 +29,12 @@ start() { # Check if the service is already running? if [ ! -f /var/lock/subsys/messagebus ]; then msg_starting messagebus + # if capability is modular, load it + if modinfo capability >/dev/null 2>&1; then + modprobe -s capability + fi dbus-uuidgen --ensure - daemon dbus-daemon --system + daemon --pidfile dbus.pid /usr/bin/dbus-daemon --system RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/messagebus else @@ -50,6 +54,17 @@ stop() { fi } +condrestart() { + if [ -f /var/lock/subsys/cpqarrayd ]; then + stop + start + else + msg_not_running messagebus + RETVAL=$1 + fi +} + +RETVAL=0 # See how we were called. case "$1" in start) @@ -62,6 +77,9 @@ case "$1" in stop start ;; + try-restart) + condrestart 0 + ;; reload|force-reload) if [ -f /var/lock/subsys/messagebus ]; then msg_reloading messagebus @@ -77,10 +95,8 @@ case "$1" in RETVAL=$? ;; *) - msg_usage "$0 {start|stop|restart|reload|force-reload|status}" + msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}" exit 3 esac exit $RETVAL - -# This must be last line !