[daemon-fix] fixed getting uid and pid when transport is not kdbus
[platform/upstream/dbus.git] / bus / rc.messagebus.in
index 4214a9f..c52ca77 100644 (file)
@@ -6,26 +6,30 @@
 # description:  This is a daemon which broadcasts notifications of system events \
 #               and other messages. See http://www.freedesktop.org/software/dbus/
 #
-# processname: dbus-daemon-1
+# processname: dbus-daemon
 # pidfile: @DBUS_SYSTEM_PID_FILE@
 #
 
 # Sanity checks.
-#[ -x @EXPANDED_BINDIR@/dbus-daemon-1 ] || exit 0
+#[ -x @EXPANDED_BINDIR@/dbus-daemon ] || exit 0
 
 # Source function library.
 #. @EXPANDED_SYSCONFDIR@/rc.d/init.d/functions
 
 # so we can rearrange this easily
-#processname=dbus-daemon-1
+#processname=dbus-daemon
 #servicename=messagebus
 
 #RETVAL=0
 
 start() {
     echo "Starting system message bus"
-    if [ -x @EXPANDED_BINDIR@/dbus-daemon-1 ];then
-       @EXPANDED_BINDIR@/dbus-daemon-1 --system
+    if [ -x @EXPANDED_BINDIR@/dbus-uuidgen ] ; then
+        @EXPANDED_BINDIR@/dbus-uuidgen --ensure
+    fi
+
+    if [ -x @EXPANDED_BINDIR@/dbus-daemon ];then
+       @EXPANDED_BINDIR@/dbus-daemon --system
     fi
     #daemon --check $servicename $processname --system
     #RETVAL=$?
@@ -39,7 +43,7 @@ stop() {
     ## we don't want to kill all the per-user $processname, we want
     ## to use the pid file *only*; because we use the fake nonexistent 
     ## program name "$servicename" that should be safe-ish
-    killall dbus-daemon-1
+    killall dbus-daemon
     #RETVAL=$?
     #echo
     #if [ $RETVAL -eq 0 ]; then
@@ -57,7 +61,7 @@ case "$1" in
         stop
         ;;
     status)
-        status $processname
+        status $servicename
         RETVAL=$?
         ;;
     restart)