Refactor: Move rest of finit.h settings to configure script.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-06-22 15:12:20 +02:00
parent 70af5d7f8d
commit 9a6ab331a6
3 changed files with 19 additions and 16 deletions
Vendored
+18 -3
View File
@@ -346,13 +346,25 @@ echo >> config.m
echo "export libdir plugindir incdir CPPFLAGS LDFLAGS LDLIBS STATIC" >> config.mk
##############################################################################
echo "/* Generated by finit configure script. */" > config.h
echo "/* Generated by finit configure script. */" > config.h
echo >> config.h
echo "#ifndef FINIT_CONFIG_H_" >> config.h
echo "#define FINIT_CONFIG_H_" >> config.h
echo >> config.h
echo "#define INIT_HEADING $heading" >> config.h
echo "#define VERBOSE_MODE $verbose" >> config.h
echo "#define KERNEL_QUIET $kernel_quiet" >> config.h
if [ $embedded -eq 1 ]; then
echo "#define EMBEDDED_SYSTEM 1" >> config.h
echo "#define EMBEDDED_SYSTEM 1" >> config.h
echo "#define SETUP_DEVFS \"/sbin/mdev -s\"" >> config.h
echo "#define GETTY \"/sbin/getty -L\"" >> config.h
echo "#define GETTY_BUSYBOX 1" >> config.h
echo "#define BAUDRATE 115200" >> config.h
else
echo "#define SETUP_DEVFS \"/sbin/udevd --daemon\"" >> config.h
echo "#define GETTY \"/sbin/getty -8\"" >> config.h
echo "#define GETTY_AGETTY 1" >> config.h
echo "#define BAUDRATE 38400" >> config.h
fi
if [ $remount -eq 1 ]; then
echo "#define REMOUNT_ROOTFS 1" >> config.h
@@ -378,3 +390,6 @@ fi
echo "#define DEFUSER \"$defuser\"" >> config.h
echo "#define DEFHOST \"$defhost\"" >> config.h
echo "#define RUNLEVEL $runlevel" >> config.h
echo >> config.h
echo "#endif /* FINIT_CONFIG_H_ */" >> config.h
-13
View File
@@ -36,19 +36,6 @@
#include <sys/stat.h>
#include <unistd.h>
/* Distribution specific configuration */
#if defined EMBEDDED_SYSTEM
# define SETUP_DEVFS "/sbin/mdev -s"
# define GETTY "/sbin/getty -L"
# define GETTY_BUSYBOX /* Tell tty.c about the getty argument order */
# define BAUDRATE 115200
#else /* Debian/Ubuntu based distributions */
# define SETUP_DEVFS "/sbin/udevd --daemon"
# define GETTY "/sbin/getty -8"
# define GETTY_AGETTY /* Tell tty.c about the getty argument order */
# define BAUDRATE 38400
#endif
/* If the user configures us to not know about any getty use the system
* defined /bin/sh (or similar) as fallback for TTYs. */
#ifndef FALLBACK_SHELL
+1
View File
@@ -25,6 +25,7 @@
#include <signal.h>
#include <sys/wait.h>
#include "config.h" /* Generated by configure script */
#include "finit.h"
#include "conf.h"
#include "helpers.h"