mirror of
https://github.com/troglobit/finit.git
synced 2026-10-09 16:50:59 +07:00
Add --with-random-seed to enable urandom plugin
By default the urandom plugin will use /var/lib/misc/random-seed across reboots to seed /dev/urandom at boot. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -111,6 +111,11 @@ AC_ARG_WITH(runlevel,
|
||||
AS_HELP_STRING([--with-runlevel=N], [Runlevel to switch to after bootstrap, default: 2]),
|
||||
[runlevel=$withval], [runlevel=2])
|
||||
|
||||
AC_ARG_WITH(random-seed,
|
||||
AS_HELP_STRING([--with-random-seed=FILE], [Save a random seed for /dev/urandom across reboots, default /var/lib/misc/random-seed]),
|
||||
[random_seed=$withval], [random_seed=/var/lib/misc/random-seed])
|
||||
|
||||
|
||||
### Enable features ###########################################################################
|
||||
|
||||
# Create config.h from selected features and fallback defautls
|
||||
@@ -198,6 +203,12 @@ AS_IF([test "x$with_runlevel" != "xno"],[
|
||||
AC_DEFINE_UNQUOTED(RUNLEVEL, 2, [Default runlevel to start after S])])
|
||||
AC_DEFINE_UNQUOTED(RUNLEVEL, $runlevel, [Runlevel to start after S])])
|
||||
|
||||
AS_IF([test "x$with_random_seed" != "xno"],[
|
||||
AS_IF([test "x$random_seed" = "xyes"],[
|
||||
random_seed=/var/lib/misc/random-seed])
|
||||
AC_EXPAND_DIR(lurvig, "$random_seed")
|
||||
AC_DEFINE_UNQUOTED(RANDOMSEED, "$lurvig", [Improve random at boot by seeding it with sth from before.])])
|
||||
|
||||
# Control build with automake flags
|
||||
AM_CONDITIONAL(STATIC, [test "x$enable_static" = "xyes"])
|
||||
AM_CONDITIONAL(INETD, [test "x$enable_inetd" = "xyes"])
|
||||
|
||||
Reference in New Issue
Block a user