mirror of
https://github.com/troglobit/finit.git
synced 2026-10-05 23:33:36 +07:00
Refactor: Move rest of finit.h settings to configure script.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user