mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-19 16:40:46 -09:00
package/urandom-scripts: new package
The init script S20urandom is used to preserve the kernel's RNG seed between reboots. This functionality is not required for the package "initscripts". Further there are use-cases where this script should not be installed at all (e.g. systems that only have read-only partitions), but that's currently not possible as the script is a mandatory part of the package "initscripts". Let's move the script into its own package "urandom-scripts" and select it, if the default skeleton is enabled. This maintains backward-compatibility and allows to deselect it. Signed-off-by: Christoph Müllner <christoph.muellner@theobroma-systems.com> [yann.morin.1998@free.fr: - extend help text - default y if initscripts (instead of skeleton default) - allow use with openRC, but not systemd ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
a757d173f1
commit
2fb5886fd7
@@ -2291,6 +2291,7 @@ menu "Security"
|
|||||||
source "package/selinux-python/Config.in"
|
source "package/selinux-python/Config.in"
|
||||||
source "package/semodule-utils/Config.in"
|
source "package/semodule-utils/Config.in"
|
||||||
source "package/setools/Config.in"
|
source "package/setools/Config.in"
|
||||||
|
source "package/urandom-scripts/Config.in"
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Shell and utilities"
|
menu "Shell and utilities"
|
||||||
|
|||||||
10
package/urandom-scripts/Config.in
Normal file
10
package/urandom-scripts/Config.in
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
config BR2_PACKAGE_URANDOM_SCRIPTS
|
||||||
|
bool "urandom-initscripts"
|
||||||
|
default y if BR2_PACKAGE_INITSCRIPTS
|
||||||
|
depends on !BR2_PACKAGE_SYSTEMD
|
||||||
|
help
|
||||||
|
Initscript to preserve the random seed between reboots.
|
||||||
|
|
||||||
|
WARNING: this is a poor fit to try and get high-quality
|
||||||
|
entropy at boot. There are better ways, like haveged, or
|
||||||
|
rng-tools.
|
||||||
12
package/urandom-scripts/urandom-scripts.mk
Normal file
12
package/urandom-scripts/urandom-scripts.mk
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# urandom-scripts
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
define URANDOM_SCRIPTS_INSTALL_INIT_SYSV
|
||||||
|
$(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S20urandom \
|
||||||
|
$(TARGET_DIR)/etc/init.d/S20urandom
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(generic-package))
|
||||||
Reference in New Issue
Block a user