summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2006-08-08 21:30:31 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2006-08-08 21:30:31 +0000
commitaaa432b0644199418eb2ce506c87397cd379df4f (patch)
treeab3c01fd243dbf8c74134160a7737d50cc1f1402 /tools
parentd33564292f0cb45c42454514797c6da1fc1de178 (diff)
* configure.in:
* tools/Makefile.am: * tools/dbus-launch.c: * bus/Makefile.am: allow --with-dbus-daemondir switch to be used to make the daemon install to a seperate bindir like /usr/libexec (patch from Brian Cameron <brian dot cameron at sun dot com)
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am2
-rw-r--r--tools/dbus-launch.c19
2 files changed, 20 insertions, 1 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index e653dea3..06d85b47 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DDBUS_COMPILATION
+INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\"
bin_PROGRAMS=dbus-send dbus-monitor dbus-launch dbus-cleanup-sockets
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index 757e833e..3004099c 100644
--- a/tools/dbus-launch.c
+++ b/tools/dbus-launch.c
@@ -771,6 +771,25 @@ main (int argc, char **argv)
verbose ("Calling exec()\n");
+ execl (DBUS_DAEMONDIR"/dbus-daemon",
+ DBUS_DAEMONDIR"/dbus-daemon",
+ "--fork",
+ "--print-pid", write_pid_fd_as_string,
+ "--print-address", write_address_fd_as_string,
+ config_file ? "--config-file" : "--session",
+ config_file, /* has to be last in this varargs list */
+ NULL);
+
+ fprintf (stderr,
+ "Failed to execute message bus daemon %s: %s. Will try again without full path.\n",
+ DBUS_DAEMONDIR"/dbus-daemon", strerror (errno));
+
+ /*
+ * If it failed, try running without full PATH. Note this is needed
+ * because the build process builds the run-with-tmp-session-bus.conf
+ * file and the dbus-daemon will not be in the install location during
+ * build time.
+ */
execlp ("dbus-daemon",
"dbus-daemon",
"--fork",