From 0f8393ef0e6ea8b579b381c0cb0472b78b5f1c9e Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Wed, 20 Aug 2008 13:13:10 -0300 Subject: [PATCH] Start dbus directly instead of calling initscript Signed-off-by: Claudio Matsuoka --- finit-alt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/finit-alt.c b/finit-alt.c index 0a24355b..5cce6d5e 100644 --- a/finit-alt.c +++ b/finit-alt.c @@ -60,7 +60,6 @@ THE SOFTWARE. #define USE_VAR_RUN_RESOLVCONF #define USE_MESSAGE_BUS #define USE_CONSOLEKIT -#define MESSAGE_BUS_START "/etc/init.d/messagebus start" #elif defined DIST_EEEXUBUNTU /* eeeXubuntu */ #define RANDOMSEED "/var/lib/urandom/random-seed" #define SYSROOT "/sysroot" @@ -127,12 +126,12 @@ void shutdown(int); void signal_handler(int); void chld_handler(int); -static int debug = 0; - #ifdef DEBUG_TIMESTAMP /* For profiling */ #include #include +static int debug = 1; + static struct timeval t0; void _d(char *fmt, ...) @@ -162,6 +161,7 @@ void _d(char *fmt, ...) } #else #define _d(x...) do { if (debug) { printf(x); printf("\n"); } } while (0) +static int debug = 0; #endif @@ -565,7 +565,10 @@ int main() _d("dbus"); mkdir("/var/run/dbus", 0755); mkdir("/var/lock/subsys/messagebus", 0755); - system(MESSAGE_BUS_START); + system("dbus-uuidgen --ensure;dbus-daemon --system"); + /* dbus-daemon needs this delay, even after checking + * availability of /var/run/dbus/system_bus_socket */ + usleep(500000); #endif #ifdef USE_CONSOLEKIT _d("consolekit");