diff --git a/finit.c b/finit.c index 9987101b..ddb8516a 100644 --- a/finit.c +++ b/finit.c @@ -186,11 +186,7 @@ int main(int argc, char* argv[]) /* * Populate /dev and prepare for runtime events from kernel. */ -#if defined(USE_UDEV) - run_interactive("udevd --daemon", "Populating device tree"); -#elif defined (MDEV) - run_interactive(MDEV " -s", "Populating device tree"); -#endif + run_interactive(SETUP_DEVFS, "Populating device tree"); /* * Parse configuration file diff --git a/finit.h b/finit.h index d6fa9269..277563cf 100644 --- a/finit.h +++ b/finit.h @@ -1,7 +1,7 @@ /* Finit - Extremely fast /sbin/init replacement w/ I/O, hook & service plugins * * Copyright (c) 2008-2010 Claudio Matsuoka - * Copyright (c) 2008-2012 Joachim Nilsson + * Copyright (c) 2008-2013 Joachim Nilsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,17 +36,17 @@ /* Distribution specific configuration */ #if defined EMBEDDED_SYSTEM # define CONSOLE "/dev/console" -# define MDEV "/sbin/mdev" +# define SETUP_DEVFS "/sbin/mdev -s" # define GETTY "/sbin/getty -L 115200 %s vt100" -# define RUNLEVEL 3 -#else /* Debian/Ubuntu based distributions */ -# define RANDOMSEED "/var/lib/urandom/random-seed" -# define CONSOLE "/dev/tty1" -# define GETTY "/sbin/getty -8 38400 %s" -# define REMOUNT_ROOTFS_RW # define RUNLEVEL 2 -# define USE_UDEV -# define USE_MESSAGE_BUS +#else /* Debian/Ubuntu based distributions */ +# define CONSOLE "/dev/tty1" +# define SETUP_DEVFS "/sbin/udevd --daemon" +# define GETTY "/sbin/getty -8 38400 %s" +# define RUNLEVEL 2 +# define RANDOMSEED "/var/lib/urandom/random-seed" +# define REMOUNT_ROOTFS_RW +# define HAVE_DBUS #endif #ifndef DEFUSER diff --git a/plugins/dbus.c b/plugins/dbus.c index 99367055..828bdee0 100644 --- a/plugins/dbus.c +++ b/plugins/dbus.c @@ -27,7 +27,7 @@ static void setup(void *UNUSED(arg)) { -#ifdef USE_MESSAGE_BUS +#ifdef HAVE_DBUS _d("Starting D-Bus ..."); mkdir("/var/run/dbus", 0755); mkdir("/var/lock/subsys/messagebus", 0755);