Refactor: Move random seed config 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 06a1a3c839
commit 155ae15390
2 changed files with 23 additions and 10 deletions
Vendored
+23 -9
View File
@@ -43,9 +43,7 @@ result()
echo
echo "Finit configuration"
echo "========================================================================"
if [ x"$heading" != x"" ]; then
echo "Heading : $heading"
fi
echo "Install prefix : $prefix"
echo "System config dir : $sysconfdir"
echo "Super user bindir : $sbindir"
@@ -61,27 +59,37 @@ fi
if [ $debug -ne 0 ]; then
echo "Debug : ENABLED"
fi
if [ $embedded -ne 0 ]; then
echo "Embedded target : YES (BusyBox getty, and mdev instead of udev)"
fi
if [ x"$random" != x"" ]; then
echo "Random seed : $random"
fi
if [ $inetd -ne 0 ]; then
echo "Inetd : Built-in"
else
echo "Inetd : DISABLED"
fi
if [ $verbose -ne 1 ]; then
echo "Quiet Finit : YES"
else
echo "Quiet Finit : NO, verbose output (default)"
fi
if [ $kernel_quiet -eq 1 ]; then
echo "Kernel Quiet : YES, silent after inital boot (default)"
else
echo "Kernel Quiet : NO"
fi
if [ $static -ne 0 ]; then
echo "Static Finit : YES"
fi
if [ $disable_plugins -eq 1 ]; then
echo "Plugins : DISABLED"
else
@@ -111,6 +119,9 @@ usage()
echo " --with-fifo=FIFO FIFO for initctl plugin, default '$fifo'"
echo " --with-config=CONFIG Finit CONFIG file, default '\$sysconfdir/$conf'"
echo " --with-heading=GREET Display GREET instead of Finit version at boot"
echo " --with-randomseed=SEED Seed /dev/urandom from file SEED. On Debian/Ubuntu"
echo " systems, set this to /var/lib/urandom/random-seed"
echo " Default: none"
echo " --with-plugins=\"a b c\" Build plugins 'a', 'b' and 'c', either as dynamic .so"
echo " files, or as built-in if --enable-static is given,"
echo " defaults to all plugins. Exclude extension!"
@@ -180,6 +191,10 @@ while [ "$*" != "" ]; do
heading="\"$arg\""
;;
with-randomseed)
random="$arg"
;;
with-plugins)
plugins="$arg"
;;
@@ -296,6 +311,9 @@ echo "export libdir plugindir incdir CPPFLAGS LDFLAGS LDLIBS STATIC" >> config.m
##############################################################################
echo "/* Generated by finit configure script. */" > 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" >> config.h
fi
@@ -303,17 +321,13 @@ fi
if [ $inetd -eq 0 ]; then
echo "#define INETD_DISABLED" >> config.h
fi
if [ x"$heading" != x"" ]; then
echo "#define INIT_HEADING $heading" >> config.h
fi
echo "#define VERBOSE_MODE $verbose" >> config.h
echo "#define KERNEL_QUIET $kernel_quiet" >> config.h
echo "#define FINIT_FIFO \"$fifo\"" >> config.h
echo "#define FINIT_CONF \"$config\"" >> config.h
echo "#define FINIT_RCSD \"$rcsd\"" >> config.h
echo "#define PLUGIN_PATH \"$plugindir\"" >> config.h
if [ x"$random" != x"" ]; then
echo "#define RANDOMSEED \"$random\"" >> config.h
fi
echo "#define DEFUSER \"$defuser\"" >> config.h
echo "#define DEFHOST \"$defhost\"" >> config.h
echo "#define RUNLEVEL $runlevel" >> config.h
-1
View File
@@ -49,7 +49,6 @@
# define GETTY "/sbin/getty -8"
# define GETTY_AGETTY /* Tell tty.c about the getty argument order */
# define BAUDRATE 38400
# define RANDOMSEED "/var/lib/urandom/random-seed"
# define REMOUNT_ROOTFS_RW
# define HAVE_DBUS
#endif