mirror of
https://github.com/troglobit/finit.git
synced 2026-11-17 19:30:29 +00:00
Refactor: Move random seed config to configure script.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
06a1a3c839
commit
155ae15390
2 files changed
+23
-10
No files matched your search
@@ -43,9 +43,7 @@ result()
|
|||||||
echo
|
echo
|
||||||
echo "Finit configuration"
|
echo "Finit configuration"
|
||||||
echo "========================================================================"
|
echo "========================================================================"
|
||||||
if [ x"$heading" != x"" ]; then
|
|
||||||
echo "Heading : $heading"
|
echo "Heading : $heading"
|
||||||
fi
|
|
||||||
echo "Install prefix : $prefix"
|
echo "Install prefix : $prefix"
|
||||||
echo "System config dir : $sysconfdir"
|
echo "System config dir : $sysconfdir"
|
||||||
echo "Super user bindir : $sbindir"
|
echo "Super user bindir : $sbindir"
|
||||||
@@ -61,27 +59,37 @@ fi
|
|||||||
if [ $debug -ne 0 ]; then
|
if [ $debug -ne 0 ]; then
|
||||||
echo "Debug : ENABLED"
|
echo "Debug : ENABLED"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $embedded -ne 0 ]; then
|
if [ $embedded -ne 0 ]; then
|
||||||
echo "Embedded target : YES (BusyBox getty, and mdev instead of udev)"
|
echo "Embedded target : YES (BusyBox getty, and mdev instead of udev)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ x"$random" != x"" ]; then
|
||||||
|
echo "Random seed : $random"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $inetd -ne 0 ]; then
|
if [ $inetd -ne 0 ]; then
|
||||||
echo "Inetd : Built-in"
|
echo "Inetd : Built-in"
|
||||||
else
|
else
|
||||||
echo "Inetd : DISABLED"
|
echo "Inetd : DISABLED"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $verbose -ne 1 ]; then
|
if [ $verbose -ne 1 ]; then
|
||||||
echo "Quiet Finit : YES"
|
echo "Quiet Finit : YES"
|
||||||
else
|
else
|
||||||
echo "Quiet Finit : NO, verbose output (default)"
|
echo "Quiet Finit : NO, verbose output (default)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $kernel_quiet -eq 1 ]; then
|
if [ $kernel_quiet -eq 1 ]; then
|
||||||
echo "Kernel Quiet : YES, silent after inital boot (default)"
|
echo "Kernel Quiet : YES, silent after inital boot (default)"
|
||||||
else
|
else
|
||||||
echo "Kernel Quiet : NO"
|
echo "Kernel Quiet : NO"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $static -ne 0 ]; then
|
if [ $static -ne 0 ]; then
|
||||||
echo "Static Finit : YES"
|
echo "Static Finit : YES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $disable_plugins -eq 1 ]; then
|
if [ $disable_plugins -eq 1 ]; then
|
||||||
echo "Plugins : DISABLED"
|
echo "Plugins : DISABLED"
|
||||||
else
|
else
|
||||||
@@ -111,6 +119,9 @@ usage()
|
|||||||
echo " --with-fifo=FIFO FIFO for initctl plugin, default '$fifo'"
|
echo " --with-fifo=FIFO FIFO for initctl plugin, default '$fifo'"
|
||||||
echo " --with-config=CONFIG Finit CONFIG file, default '\$sysconfdir/$conf'"
|
echo " --with-config=CONFIG Finit CONFIG file, default '\$sysconfdir/$conf'"
|
||||||
echo " --with-heading=GREET Display GREET instead of Finit version at boot"
|
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 " --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 " files, or as built-in if --enable-static is given,"
|
||||||
echo " defaults to all plugins. Exclude extension!"
|
echo " defaults to all plugins. Exclude extension!"
|
||||||
@@ -180,6 +191,10 @@ while [ "$*" != "" ]; do
|
|||||||
heading="\"$arg\""
|
heading="\"$arg\""
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
with-randomseed)
|
||||||
|
random="$arg"
|
||||||
|
;;
|
||||||
|
|
||||||
with-plugins)
|
with-plugins)
|
||||||
plugins="$arg"
|
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 "/* 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
|
if [ $embedded -eq 1 ]; then
|
||||||
echo "#define EMBEDDED_SYSTEM" >> config.h
|
echo "#define EMBEDDED_SYSTEM" >> config.h
|
||||||
fi
|
fi
|
||||||
@@ -303,17 +321,13 @@ fi
|
|||||||
if [ $inetd -eq 0 ]; then
|
if [ $inetd -eq 0 ]; then
|
||||||
echo "#define INETD_DISABLED" >> config.h
|
echo "#define INETD_DISABLED" >> config.h
|
||||||
fi
|
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_FIFO \"$fifo\"" >> config.h
|
||||||
echo "#define FINIT_CONF \"$config\"" >> config.h
|
echo "#define FINIT_CONF \"$config\"" >> config.h
|
||||||
echo "#define FINIT_RCSD \"$rcsd\"" >> config.h
|
echo "#define FINIT_RCSD \"$rcsd\"" >> config.h
|
||||||
echo "#define PLUGIN_PATH \"$plugindir\"" >> 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 DEFUSER \"$defuser\"" >> config.h
|
||||||
echo "#define DEFHOST \"$defhost\"" >> config.h
|
echo "#define DEFHOST \"$defhost\"" >> config.h
|
||||||
echo "#define RUNLEVEL $runlevel" >> config.h
|
echo "#define RUNLEVEL $runlevel" >> config.h
|
||||||
@@ -49,7 +49,6 @@
|
|||||||
# define GETTY "/sbin/getty -8"
|
# define GETTY "/sbin/getty -8"
|
||||||
# define GETTY_AGETTY /* Tell tty.c about the getty argument order */
|
# define GETTY_AGETTY /* Tell tty.c about the getty argument order */
|
||||||
# define BAUDRATE 38400
|
# define BAUDRATE 38400
|
||||||
# define RANDOMSEED "/var/lib/urandom/random-seed"
|
|
||||||
# define REMOUNT_ROOTFS_RW
|
# define REMOUNT_ROOTFS_RW
|
||||||
# define HAVE_DBUS
|
# define HAVE_DBUS
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user