mirror of
https://github.com/troglobit/finit.git
synced 2026-11-10 16:31:21 +00:00
Start dbus directly instead of calling initscript
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
1 parent
a1d7e48225
commit
0f8393ef0e
1 file changed
+7
-4
+7
-4
@@ -60,7 +60,6 @@ THE SOFTWARE.
|
|||||||
#define USE_VAR_RUN_RESOLVCONF
|
#define USE_VAR_RUN_RESOLVCONF
|
||||||
#define USE_MESSAGE_BUS
|
#define USE_MESSAGE_BUS
|
||||||
#define USE_CONSOLEKIT
|
#define USE_CONSOLEKIT
|
||||||
#define MESSAGE_BUS_START "/etc/init.d/messagebus start"
|
|
||||||
#elif defined DIST_EEEXUBUNTU /* eeeXubuntu */
|
#elif defined DIST_EEEXUBUNTU /* eeeXubuntu */
|
||||||
#define RANDOMSEED "/var/lib/urandom/random-seed"
|
#define RANDOMSEED "/var/lib/urandom/random-seed"
|
||||||
#define SYSROOT "/sysroot"
|
#define SYSROOT "/sysroot"
|
||||||
@@ -127,12 +126,12 @@ void shutdown(int);
|
|||||||
void signal_handler(int);
|
void signal_handler(int);
|
||||||
void chld_handler(int);
|
void chld_handler(int);
|
||||||
|
|
||||||
static int debug = 0;
|
|
||||||
|
|
||||||
#ifdef DEBUG_TIMESTAMP /* For profiling */
|
#ifdef DEBUG_TIMESTAMP /* For profiling */
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
static int debug = 1;
|
||||||
|
|
||||||
static struct timeval t0;
|
static struct timeval t0;
|
||||||
|
|
||||||
void _d(char *fmt, ...)
|
void _d(char *fmt, ...)
|
||||||
@@ -162,6 +161,7 @@ void _d(char *fmt, ...)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define _d(x...) do { if (debug) { printf(x); printf("\n"); } } while (0)
|
#define _d(x...) do { if (debug) { printf(x); printf("\n"); } } while (0)
|
||||||
|
static int debug = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -565,7 +565,10 @@ int main()
|
|||||||
_d("dbus");
|
_d("dbus");
|
||||||
mkdir("/var/run/dbus", 0755);
|
mkdir("/var/run/dbus", 0755);
|
||||||
mkdir("/var/lock/subsys/messagebus", 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
|
#endif
|
||||||
#ifdef USE_CONSOLEKIT
|
#ifdef USE_CONSOLEKIT
|
||||||
_d("consolekit");
|
_d("consolekit");
|
||||||
|
|||||||
Reference in new issue
Block a user