summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/dbus/files/80-dbus-r1')
-rw-r--r--sys-apps/dbus/files/80-dbus-r113
1 files changed, 13 insertions, 0 deletions
diff --git a/sys-apps/dbus/files/80-dbus-r1 b/sys-apps/dbus/files/80-dbus-r1
new file mode 100644
index 000000000000..edef88a3c30c
--- /dev/null
+++ b/sys-apps/dbus/files/80-dbus-r1
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# launches a session dbus instance
+
+dbuslaunch="`command -v dbus-launch 2>/dev/null`"
+if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
+ if [ -n "$command" ]; then
+ command="$dbuslaunch --exit-with-session $command"
+ else
+ eval `$dbuslaunch --sh-syntax --exit-with-session`
+ fi
+fi
+