]> git.pld-linux.org Git - packages/dbus.git/blobdiff - dbus-daemon-1-profile.d-sh
- updated to 1.10.4
[packages/dbus.git] / dbus-daemon-1-profile.d-sh
index 3bab24820a406d6bc7f0288ce827da599fc40dec..5b572f047b914607572f027a756eee3df0dadf36 100644 (file)
@@ -1,6 +1,30 @@
+#! /bin/sh
 
-if [ -f /usr/bin/dbus-launch ]; then
-       if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
-           eval `dbus-launch --sh-syntax --exit-with-session`
-       fi    
-fi
+# Get configuration
+. /etc/sysconfig/messagebus
+
+# Take from rc-scripts
+is_yes()
+{
+       # Check value
+       case "$1" in
+         yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1)
+               # true returns zero
+               return 0
+               ;;
+         *)
+               # false returns one
+               return 1
+               ;;
+       esac
+}
+
+if is_yes "${SESSION_BUS_PROFILE_D}"; then
+    if [ -f /usr/bin/dbus-launch ]; then
+       if [ -f /var/run/dbus.pid ]; then
+           if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+               eval `dbus-launch --sh-syntax --exit-with-session`
+           fi    
+       fi
+    fi
+fi
\ No newline at end of file
This page took 0.025903 seconds and 4 git commands to generate.