]>
Commit | Line | Data |
---|---|---|
d085dddd | 1 | #! /bin/sh |
636e6686 | 2 | |
e9cc8b1a TP |
3 | [ -x /usr/bin/dbus-launch -a -f /var/run/dbus.pid ] || return |
4 | ||
d085dddd | 5 | # Get configuration |
e5ccf172 | 6 | . /etc/sysconfig/messagebus |
d085dddd | 7 | |
e9cc8b1a | 8 | # Taken from rc-scripts |
d085dddd MK |
9 | is_yes() |
10 | { | |
11 | # Check value | |
12 | case "$1" in | |
13 | yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1) | |
14 | # true returns zero | |
15 | return 0 | |
16 | ;; | |
17 | *) | |
18 | # false returns one | |
19 | return 1 | |
20 | ;; | |
21 | esac | |
22 | } | |
23 | ||
e9cc8b1a TP |
24 | if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && is_yes "${SESSION_BUS_PROFILE_D}"; then |
25 | eval `dbus-launch --sh-syntax --exit-with-session` | |
26 | fi | |
27 | ||
28 | unset -f is_yes |