summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/basic/def.h9
-rw-r--r--src/libelogind/sd-bus/test-bus-vtable.c8
2 files changed, 17 insertions, 0 deletions
diff --git a/src/basic/def.h b/src/basic/def.h
index 45b53c248..ee4c672ac 100644
--- a/src/basic/def.h
+++ b/src/basic/def.h
@@ -48,7 +48,16 @@
/* Note that we use the new /run prefix here (instead of /var/run) since we require them to be aliases and that way we
* become independent of /var being mounted */
+#if 0 /// elogind should support both /run/dbus & /var/run/dbus (per Linux FHS)
#define DEFAULT_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
+#else
+/* Not all systems have dbus hierarchy in /run (as preferred by systemd) */
+#if VARRUN_IS_SYMLINK
+ #define DEFAULT_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
+#else
+ #define DEFAULT_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
+#endif // VARRUN_IS_SYMLINK
+#endif // 0
#define DEFAULT_USER_BUS_ADDRESS_FMT "unix:path=%s/bus"
#define PLYMOUTH_SOCKET { \
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;