]> git.pld-linux.org Git - packages/dbus.git/blobdiff - dbus-daemon-1-profile.d-sh
- updated to 1.8.12 (avoid regression caused by CVE-2014-3639 patch on some systems...
[packages/dbus.git] / dbus-daemon-1-profile.d-sh
index 31f2bc15892b3b328dc14969af4ef1ca1d5b166c..5b572f047b914607572f027a756eee3df0dadf36 100644 (file)
@@ -1,8 +1,30 @@
+#! /bin/sh
 
-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    
+# 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
+fi
\ No newline at end of file
This page took 0.215411 seconds and 4 git commands to generate.