Patchwork [v2,6/6] initscripts: Add support for /etc/default/urandom

login
register
mail settings
Submitter Ben Shelton
Date July 17, 2014, 9:56 p.m.
Message ID <d0f8c4b25dae67f30c57ca9c84becc3fdbd57b01.1405633546.git.ben.shelton@ni.com>
Download mbox | patch
Permalink /patch/75963/
State Accepted
Commit b163ba19de819a25fc509134167b986a7f9a1c52
Headers show

Comments

Ben Shelton - July 17, 2014, 9:56 p.m.
From: Richard Tollerton <rich.tollerton@ni.com>

Source /etc/default/urandom if present.  This allows the rootfs to
remain read-only while enabling the user to override the location of the
random seed file.

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/urandom | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/urandom b/meta/recipes-core/initscripts/initscripts-1.0/urandom
index ec4ef61..af1625b 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/urandom
+++ b/meta/recipes-core/initscripts/initscripts-1.0/urandom
@@ -16,6 +16,7 @@  test -c /dev/urandom || exit 0
 RANDOM_SEED_FILE=/var/lib/urandom/random-seed
 
 . /etc/default/rcS
+[ -f /etc/default/urandom ] && . /etc/default/urandom
 
 case "$1" in
 	start|"")