diff options
author | Christoph Willing <chris.willing@linux.com> | 2018-09-26 23:14:02 +1000 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-09-26 18:29:59 +0200 |
commit | b0c24eee5154ec046725b108fdb3cded008afc00 (patch) | |
tree | 4dab9cc8087b06ac13b687d48de3393683a1d81c /src/libelogind/sd-bus/test-bus-vtable.c | |
parent | 938f002d22d44380b2087a43ef1666cb762434cd (diff) |
Support system_bus_socket to be found in /var/run/dbus as well as /run/dbus.
Currently the path to system_bus_socket is hardcoded to
/run/dbus/system_bus_socket
which works everywhere for systemd.
However, distributions which do no symlink /var/run on /run will have
it only accessible via
/run/dbus/system_bus_socket
which should be supported by elogind, too.
Closes #77
Signed-off-by: Christoph Willing <chris.willing@linux.com>
Sigend-off-by: Sven Eden <sven.eden@prydeworx.com>
Diffstat (limited to 'src/libelogind/sd-bus/test-bus-vtable.c')
-rw-r--r-- | src/libelogind/sd-bus/test-bus-vtable.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libelogind/sd-bus/test-bus-vtable.c b/src/libelogind/sd-bus/test-bus-vtable.c index fd9ad8121..5604aa668 100644 --- a/src/libelogind/sd-bus/test-bus-vtable.c +++ b/src/libelogind/sd-bus/test-bus-vtable.c @@ -8,7 +8,15 @@ #include "sd-bus-vtable.h" +#if 0 /// elogind should support both /run/dbus & /var/run/dbus (per Linux FHS) #define DEFAULT_BUS_PATH "unix:path=/run/dbus/system_bus_socket" +#else +#if VARRUN_IS_SYMLINK + #define DEFAULT_BUS_PATH "unix:path=/run/dbus/system_bus_socket" +#else + #define DEFAULT_BUS_PATH "unix:path=/var/run/dbus/system_bus_socket" +#endif // VARRUN_IS_SYMLINK +#endif // 0 struct context { bool quit; |