mirror of
https://github.com/troglobit/finit.git
synced 2026-10-25 12:04:36 +00:00
Refactor .conf file parser and add support for runlevel N
This commit is a refactor of how arguments to finit.conf file settings are parsed. Not all settings are run directly, but only need the arg for future use. The code should be a lot easier to understand now. Also, added support for specifying the desired runlevel in finit.conf Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
4d57b14b5b
commit
f690767507
2 files changed
+56
-43
No files matched your search
@@ -33,17 +33,18 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Distribution configuration */
|
||||
|
||||
/* Distribution specific configuration */
|
||||
#if defined EMBEDDED_SYSTEM
|
||||
# define CONSOLE "/dev/console"
|
||||
# define MDEV "/sbin/mdev"
|
||||
# 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
|
||||
#endif
|
||||
@@ -58,8 +59,6 @@
|
||||
#define CMD_SIZE 256
|
||||
#define LINE_SIZE 1024
|
||||
#define BUF_SIZE 4096
|
||||
#define USERNAME_SIZE 16
|
||||
#define HOSTNAME_SIZE 32
|
||||
|
||||
#define INIT_MAGIC 0x03091969
|
||||
#define INIT_CMD_RUNLVL 1
|
||||
|
||||
Reference in new issue
Block a user