SOURCES: dbus-xinitrc.sh (NEW) - restored

freetz freetz at pld-linux.org
Wed Jul 12 22:52:48 CEST 2006


Author: freetz                       Date: Wed Jul 12 20:52:48 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- restored

---- Files affected:
SOURCES:
   dbus-xinitrc.sh (1.2 -> 1.3)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/dbus-xinitrc.sh
diff -u /dev/null SOURCES/dbus-xinitrc.sh:1.3
--- /dev/null	Wed Jul 12 22:52:48 2006
+++ SOURCES/dbus-xinitrc.sh	Wed Jul 12 22:52:43 2006
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+# Get configuration
+. /etc/sysconfig/dbus
+
+# Taken 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_X_SESSION}"; 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
================================================================


More information about the pld-cvs-commit mailing list